bmc: move verify systemd mode to parameter
Move the mode for the trigger service to a parameter instead of
hard-coding it. This isn't yet a json configuration option, that'll be
next.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I59564320015c22be1ec3a4701479d0ee93b9f1f7
diff --git a/bmc/test/firmware_json_unittest.cpp b/bmc/test/firmware_json_unittest.cpp
index 04c0f09..8b4f130 100644
--- a/bmc/test/firmware_json_unittest.cpp
+++ b/bmc/test/firmware_json_unittest.cpp
@@ -1,5 +1,6 @@
#include "buildjson.hpp"
#include "update_systemd.hpp"
+#include "verify_systemd.hpp"
#include <nlohmann/json.hpp>
@@ -423,6 +424,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");
EXPECT_FALSE(h[0].actions->update == nullptr);
auto updater =
reinterpret_cast<SystemdUpdateMechanism*>(h[0].actions->update.get());