bmc: add mode json option for verification systemd

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ibe5764c4e2ad7dd938177c813c8c6706886258a2
diff --git a/bmc/test/firmware_json_unittest.cpp b/bmc/test/firmware_json_unittest.cpp
index 8b4f130..70676bf 100644
--- a/bmc/test/firmware_json_unittest.cpp
+++ b/bmc/test/firmware_json_unittest.cpp
@@ -433,7 +433,7 @@
     EXPECT_THAT(updater->getMode(), "replace");
 }
 
-TEST(FirmwareJsonTest, VerifyValidUpdateWithMode)
+TEST(FirmwareJsonTest, VerifyValidWithModes)
 {
     auto j2 = R"(
         [{
@@ -450,7 +450,8 @@
                 "verification" : {
                     "type" : "fileSystemdVerify",
                     "unit" : "phosphor-ipmi-flash-bmc-verify.target",
-                    "path" : "/tmp/bmc.verify"
+                    "path" : "/tmp/bmc.verify",
+                    "mode" : "replace-nope"
                 },
                 "update" : {
                     "type" : "systemd",
@@ -467,6 +468,9 @@
     EXPECT_FALSE(h[0].actions == nullptr);
     EXPECT_FALSE(h[0].actions->preparation == nullptr);
     EXPECT_FALSE(h[0].actions->verification == nullptr);
+    auto verifier = reinterpret_cast<SystemdVerification*>(
+        h[0].actions->verification.get());
+    EXPECT_THAT(verifier->getMode(), "replace-nope");
     EXPECT_FALSE(h[0].actions->update == nullptr);
     auto updater =
         reinterpret_cast<SystemdUpdateMechanism*>(h[0].actions->update.get());