test: start state-transition-specific unit-tests
The goal of state-transition-specific unit-tests is to verify the
commands at each state are accepted or rejected as expected.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ic1790ca01e298347afaf2162bba9cfdc6636b2dc
diff --git a/test/Makefile.am b/test/Makefile.am
index f0f87a4..a85d13d 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -32,7 +32,8 @@
firmware_delete_unittest \
firmware_sessionstat_unittest \
firmware_commit_unittest \
- file_handler_unittest
+ file_handler_unittest \
+ firmware_state_notyetstarted
if BUILD_HOST_TOOL
check_PROGRAMS += \
@@ -79,6 +80,9 @@
file_handler_unittest_SOURCES = file_handler_unittest.cpp
file_handler_unittest_LDADD = $(top_builddir)/libfirmwareblob_common.la -lstdc++fs
+firmware_state_notyetstarted_SOURCES = firmware_state_notyetstarted.cpp
+firmware_state_notyetstarted_LDADD = $(top_builddir)/libfirmwareblob_common.la
+
if BUILD_HOST_TOOL
tools_bt_unittest_SOURCES = tools_bt_unittest.cpp
tools_bt_unittest_LDADD = $(top_builddir)/tools/libupdater.la
diff --git a/test/firmware_state_notyetstarted.cpp b/test/firmware_state_notyetstarted.cpp
new file mode 100644
index 0000000..7e10c8a
--- /dev/null
+++ b/test/firmware_state_notyetstarted.cpp
@@ -0,0 +1,20 @@
+/**
+ * The goal of these tests is to verify the behavior of all blob commands given
+ * the current state is notYetStarted. The initial state.
+ */
+#include "firmware_handler.hpp"
+#include "firmware_unittest.hpp"
+
+#include <gtest/gtest.h>
+
+namespace ipmi_flash
+{
+namespace
+{
+
+class FirmwareHandlerNotYetStartedTest : public FakeLpcFirmwareTest
+{
+};
+
+} // namespace
+} // namespace ipmi_flash