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

Unified Diff: omaha_request_params_unittest.cc

Issue 3017006: AU: pass whether or not we can tolerate a delta to the server (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: merge master (which has petkov's CL in) Created 10 years, 5 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
« no previous file with comments | « omaha_request_params.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_params_unittest.cc
diff --git a/omaha_request_params_unittest.cc b/omaha_request_params_unittest.cc
index 54d8dbd9e5ff118e0797f69ddb76555c2d5932df..200b23b4abb672551fc8fc3ca6266a3be5cd4365 100644
--- a/omaha_request_params_unittest.cc
+++ b/omaha_request_params_unittest.cc
@@ -98,6 +98,7 @@ TEST_F(OmahaRequestDeviceParamsTest, SimpleTest) {
EXPECT_EQ("{87efface-864d-49a5-9bb3-4b050a7c227a}", out.app_id);
EXPECT_EQ("0.2.2.3", out.app_version);
EXPECT_EQ("en-US", out.app_lang);
+ EXPECT_TRUE(out.delta_okay);
EXPECT_EQ("footrack", out.app_track);
}
EXPECT_EQ(0, System(string("rm -rf ") + kTestDir));
@@ -176,4 +177,20 @@ TEST_F(OmahaRequestDeviceParamsTest, MachineIdPersistsTest) {
EXPECT_EQ(0, System(string("rm -rf ") + kTestDir));
}
+TEST_F(OmahaRequestDeviceParamsTest, NoDeltasTest) {
+ ASSERT_EQ(0, System(string("mkdir -p ") + kTestDir + "/etc"));
+ ASSERT_EQ(0, System(string("mkdir -p ") + kTestDir +
+ utils::kStatefulPartition + "/etc"));
+ ASSERT_TRUE(WriteFileString(
+ kTestDir + "/etc/lsb-release",
+ "CHROMEOS_RELEASE_FOO=CHROMEOS_RELEASE_VERSION=1.2.3.4\n"
+ "CHROMEOS_RELEASE_VERSION=0.2.2.3\n"
+ "CHROMEOS_RELEASE_TRXCK=footrack"));
+ ASSERT_TRUE(WriteFileString(kTestDir + "/.nodelta", ""));
+ OmahaRequestParams out;
+ EXPECT_TRUE(DoTest(&out));
+ EXPECT_FALSE(out.delta_okay);
+ EXPECT_EQ(0, System(string("rm -rf ") + kTestDir));
+}
+
} // namespace chromeos_update_engine
« no previous file with comments | « omaha_request_params.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698