bmc: merge update and prepare systemd
The update systemd and prepare systemd were effectively the same, and
this makes the systemd action generic.
Tested: Not tested beyond unit-tests continuing to pass.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8070731e53bfd6cdafb1d74d9db652f20341985e
diff --git a/bmc/test/firmware_json_unittest.cpp b/bmc/test/firmware_json_unittest.cpp
index bb2585d..d56a20a 100644
--- a/bmc/test/firmware_json_unittest.cpp
+++ b/bmc/test/firmware_json_unittest.cpp
@@ -1,6 +1,5 @@
#include "buildjson.hpp"
#include "general_systemd.hpp"
-#include "update_systemd.hpp"
#include <nlohmann/json.hpp>
@@ -490,8 +489,7 @@
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());
+ auto updater = reinterpret_cast<SystemdNoFile*>(h[0].actions->update.get());
EXPECT_THAT(updater->getMode(), "replace");
}
@@ -534,8 +532,7 @@
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());
+ auto updater = reinterpret_cast<SystemdNoFile*>(h[0].actions->update.get());
EXPECT_THAT(updater->getMode(), "replace-fake");
}