diff options
author | Alex Deymo <deymo@google.com> | 2015-11-25 20:30:40 -0300 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2015-11-25 20:43:41 -0300 |
commit | b15a0b8eaf18c9e9341706df9f4ab59ce595a67c (patch) | |
tree | 68e4ba79eb7b93e3dfbbd2c72ba305a64e05dfda /payload_consumer/postinstall_runner_action_unittest.cc | |
parent | 706a5abae125b8f5ba58a9b7e1e51570bbaa2089 (diff) |
Remove SystemState from post-install step.
The post-install action only requires to mark the new slot as ready,
for which it was including a reference to the whole SystemState. This
patch removes said dependency replacing it for just the
BootControlInterface.
Bug: 25773375
TEST=FEATURES=test emerge-link update_engine; mma
Change-Id: I814d47c138c7565e9a80f316f25e124adb0d9c4e
Diffstat (limited to 'payload_consumer/postinstall_runner_action_unittest.cc')
-rw-r--r-- | payload_consumer/postinstall_runner_action_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/payload_consumer/postinstall_runner_action_unittest.cc b/payload_consumer/postinstall_runner_action_unittest.cc index c54ace80..beed4f16 100644 --- a/payload_consumer/postinstall_runner_action_unittest.cc +++ b/payload_consumer/postinstall_runner_action_unittest.cc @@ -34,9 +34,9 @@ #include <gtest/gtest.h> #include "update_engine/common/constants.h" +#include "update_engine/common/fake_boot_control.h" #include "update_engine/common/test_utils.h" #include "update_engine/common/utils.h" -#include "update_engine/fake_system_state.h" using brillo::MessageLoop; using chromeos_update_engine::test_utils::System; @@ -66,7 +66,7 @@ class PostinstallRunnerActionTest : public ::testing::Test { brillo::BaseMessageLoop loop_{&base_loop_}; brillo::AsynchronousSignalHandler async_signal_handler_; Subprocess subprocess_; - FakeSystemState fake_system_state_; + FakeBootControl fake_boot_control_; }; class PostinstActionProcessorDelegate : public ActionProcessorDelegate { @@ -196,7 +196,7 @@ void PostinstallRunnerActionTest::DoTest( install_plan.download_url = "http://devserver:8080/update"; install_plan.powerwash_required = powerwash_required; feeder_action.set_obj(install_plan); - PostinstallRunnerAction runner_action(&fake_system_state_, + PostinstallRunnerAction runner_action(&fake_boot_control_, powerwash_marker_file.c_str()); BondActions(&feeder_action, &runner_action); ObjectCollectorAction<InstallPlan> collector_action; @@ -252,7 +252,7 @@ void PostinstallRunnerActionTest::DoTest( // Death tests don't seem to be working on Hardy TEST_F(PostinstallRunnerActionTest, DISABLED_RunAsRootDeathTest) { ASSERT_EQ(0, getuid()); - PostinstallRunnerAction runner_action(&fake_system_state_); + PostinstallRunnerAction runner_action(&fake_boot_control_); ASSERT_DEATH({ runner_action.TerminateProcessing(); }, "postinstall_runner_action.h:.*] Check failed"); } |