bmc: config: add skip action

If you specify the action for one of the three fields as "skip" it'll
create a handler object for that action that always returns success and
has no effect.  This action therefore "skips" the step, moving the state
machine forward as though it was a successful real action.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib4c1091745eb96b8381a332bbeb0562625d3bfbe
diff --git a/bmc/test/firmware_skip_unittest.cpp b/bmc/test/firmware_skip_unittest.cpp
new file mode 100644
index 0000000..a549582
--- /dev/null
+++ b/bmc/test/firmware_skip_unittest.cpp
@@ -0,0 +1,36 @@
+#include "skip_action.hpp"
+#include "status.hpp"
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+namespace ipmi_flash
+{
+namespace
+{
+
+TEST(SkipActionTest, ValidateTriggerReturnsTrue)
+{
+    SkipAction skip;
+    EXPECT_TRUE(skip.trigger());
+    EXPECT_TRUE(skip.trigger());
+}
+
+TEST(SkipActionTest, ValidateStatusAlwaysSuccess)
+{
+    SkipAction skip;
+    EXPECT_EQ(ActionStatus::success, skip.status());
+    EXPECT_TRUE(skip.trigger());
+    EXPECT_EQ(ActionStatus::success, skip.status());
+}
+
+TEST(SkipActionTest, AbortHasNoImpactOnStatus)
+{
+    SkipAction skip;
+    EXPECT_EQ(ActionStatus::success, skip.status());
+    skip.abort();
+    EXPECT_EQ(ActionStatus::success, skip.status());
+}
+
+} // namespace
+} // namespace ipmi_flash