AU: Many minor cleanup changes
postinstall: Run postinst twice, once for pre-commit (ie, before we
mark the install partition bootable in the partition table), and
post-commit (for after we do). This behavior is needed for specific
types of firmware update.
download action: flush caches, as we found was necessary in
memento_updater.sh
omaha request prep action: update the names of keys we look for in
lsb-release, also get the AU server url from a file, rather than
hard-code it.
set bootable flag action: GPT support.
also, some misc utility functions.
BUG=None
TEST=attached unittests
Review URL: http://codereview.chromium.org/1881001
diff --git a/update_check_action_unittest.cc b/update_check_action_unittest.cc
index c57e2cd..c730b40 100644
--- a/update_check_action_unittest.cc
+++ b/update_check_action_unittest.cc
@@ -162,7 +162,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest");
+ "unittest",
+ ""); // url
UpdateCheckResponse response;
ASSERT_TRUE(
TestUpdateCheckAction(params,
@@ -182,7 +183,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ ""); // url
UpdateCheckResponse response;
ASSERT_TRUE(
TestUpdateCheckAction(params,
@@ -216,7 +218,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest");
+ "unittest",
+ ""); // url
const string http_response(GetNoUpdateResponse(UpdateCheckParams::kAppId));
GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE);
@@ -248,7 +251,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ "http://url");
UpdateCheckResponse response;
ASSERT_FALSE(
TestUpdateCheckAction(params,
@@ -268,7 +272,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ "http://url");
UpdateCheckResponse response;
ASSERT_FALSE(TestUpdateCheckAction(
params,
@@ -291,7 +296,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ "http://url");
UpdateCheckResponse response;
ASSERT_FALSE(TestUpdateCheckAction(
params,
@@ -314,7 +320,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ "http://url");
UpdateCheckResponse response;
ASSERT_FALSE(TestUpdateCheckAction(
params,
@@ -337,7 +344,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ "http://url");
UpdateCheckResponse response;
ASSERT_TRUE(TestUpdateCheckAction(params,
string("<?xml version=\"1.0\" "
@@ -395,7 +403,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest");
+ "unittest",
+ "http://url");
string http_response("doesn't matter");
GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE);
@@ -434,7 +443,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ "http://url");
UpdateCheckResponse response;
ASSERT_FALSE(
TestUpdateCheckAction(params,
@@ -461,7 +471,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ "http://url");
UpdateCheckResponse response;
ASSERT_TRUE(
TestUpdateCheckAction(params,
@@ -490,7 +501,8 @@
UpdateCheckParams::kAppId,
"0.1.0.0",
"en-US",
- "unittest_track");
+ "unittest_track",
+ "http://url");
UpdateCheckResponse response;
ASSERT_TRUE(
TestUpdateCheckAction(params,