Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: src/platform/update_engine/postinstall_runner_action_unittest.cc

Issue 1881001: AU: Many minor cleanup changes (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/update_engine/postinstall_runner_action_unittest.cc
diff --git a/src/platform/update_engine/postinstall_runner_action_unittest.cc b/src/platform/update_engine/postinstall_runner_action_unittest.cc
index 7c1993e73bc4182b960a534dbf5c328f7d927b67..9b19158e3526443ba083e61d9f9c389b6569457f 100644
--- a/src/platform/update_engine/postinstall_runner_action_unittest.cc
+++ b/src/platform/update_engine/postinstall_runner_action_unittest.cc
@@ -110,11 +110,13 @@ void PostinstallRunnerActionTest::DoTest(bool do_losetup, bool do_err_script) {
ASSERT_EQ(0, System(string("losetup ") + dev + " " + cwd + "/image.dat"));
ActionProcessor processor;
- ObjectFeederAction<string> feeder_action;
- feeder_action.set_obj(dev);
- PostinstallRunnerAction runner_action;
+ ObjectFeederAction<InstallPlan> feeder_action;
+ InstallPlan install_plan;
+ install_plan.install_path = dev;
+ feeder_action.set_obj(install_plan);
+ PostinstallRunnerAction runner_action(true);
BondActions(&feeder_action, &runner_action);
- ObjectCollectorAction<string> collector_action;
+ ObjectCollectorAction<InstallPlan> collector_action;
BondActions(&runner_action, &collector_action);
PostinstActionProcessorDelegate delegate;
processor.EnqueueAction(&feeder_action);
@@ -127,9 +129,10 @@ void PostinstallRunnerActionTest::DoTest(bool do_losetup, bool do_err_script) {
EXPECT_TRUE(delegate.success_set_);
EXPECT_EQ(do_losetup && !do_err_script, delegate.success_);
- EXPECT_EQ(do_losetup && !do_err_script, !collector_action.object().empty());
+ EXPECT_EQ(do_losetup && !do_err_script,
+ !collector_action.object().install_path.empty());
if (do_losetup && !do_err_script) {
- EXPECT_EQ(dev, collector_action.object());
+ EXPECT_TRUE(install_plan == collector_action.object());
}
struct stat stbuf;
@@ -148,7 +151,7 @@ void PostinstallRunnerActionTest::DoTest(bool do_losetup, bool do_err_script) {
// Death tests don't seem to be working on Hardy
TEST_F(PostinstallRunnerActionTest, DISABLED_RunAsRootDeathTest) {
ASSERT_EQ(0, getuid());
- PostinstallRunnerAction runner_action;
+ PostinstallRunnerAction runner_action(true);
ASSERT_DEATH({ runner_action.TerminateProcessing(); },
"postinstall_runner_action.h:.*] Check failed");
}
« no previous file with comments | « src/platform/update_engine/postinstall_runner_action.cc ('k') | src/platform/update_engine/set_bootable_flag_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698