Skip to content

Commit c482bbd

Browse files
gigilibala2chrome-bot
authored and
chrome-bot
committed
update_engine: clean up depreacated values in omaha response
There are a few depreacated values that still exist only in the unittests which needs complete depreacation: These are include: - needsadmin - ChromeOSVersion - IsDelta Also replace sample_omaha_v3_response.xml with a newer sample. BUG=none TEST=unittests pass Change-Id: If22e08dd350faf700898af9a86876628ed00f1a5 Reviewed-on: https://chromium-review.googlesource.com/1238989 Commit-Ready: Amin Hassani <[email protected]> Tested-by: Amin Hassani <[email protected]> Reviewed-by: Sen Jiang <[email protected]>
1 parent 46b1fd1 commit c482bbd

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

omaha_request_action_unittest.cc

+3-10
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,16 @@ struct FakeUpdateResponse {
146146
: "") +
147147
"</packages>"
148148
"<actions><action event=\"postinstall\" MetadataSize=\"11" +
149-
(multi_package ? ":22" : "") + "\" ChromeOSVersion=\"" + version +
150-
"\" MoreInfo=\"" + more_info_url + "\" Prompt=\"" + prompt +
149+
(multi_package ? ":22" : "") + "\" MoreInfo=\"" + more_info_url +
150+
"\" Prompt=\"" + prompt +
151151
"\" "
152-
"IsDelta=\"true\" "
153152
"IsDeltaPayload=\"true" +
154153
(multi_package ? ":false" : "") +
155154
"\" "
156155
"MaxDaysToScatter=\"" +
157156
max_days_to_scatter +
158157
"\" "
159-
"sha256=\"not-used\" "
160-
"needsadmin=\"" +
161-
needsadmin + "\" " +
158+
"sha256=\"not-used\" " +
162159
(deadline.empty() ? "" : ("deadline=\"" + deadline + "\" ")) +
163160
(disable_p2p_for_downloading ? "DisableP2PForDownloading=\"true\" "
164161
: "") +
@@ -201,7 +198,6 @@ struct FakeUpdateResponse {
201198
string codebase2 = "http://code/base/2/";
202199
string filename = "file.signed";
203200
string hash = "4841534831323334";
204-
string needsadmin = "false";
205201
uint64_t size = 123;
206202
string deadline = "";
207203
string max_days_to_scatter = "7";
@@ -1642,12 +1638,9 @@ TEST_F(OmahaRequestActionTest, MissingFieldTest) {
16421638
"<packages><package hash=\"not-used\" name=\"f\" "
16431639
"size=\"587\" hash_sha256=\"lkq34j5345\"/></packages>"
16441640
"<actions><action event=\"postinstall\" "
1645-
"ChromeOSVersion=\"10.2.3.4\" "
16461641
"Prompt=\"false\" "
1647-
"IsDelta=\"true\" "
16481642
"IsDeltaPayload=\"false\" "
16491643
"sha256=\"not-used\" "
1650-
"needsadmin=\"true\" "
16511644
"/></actions></manifest></updatecheck></app></response>";
16521645
LOG(INFO) << "Input Response = " << input_response;
16531646

sample_omaha_v3_response.xml

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
12
<response protocol="3.0" server="prod">
2-
<daystart elapsed_seconds="56652"/>
3-
<app appid="{90f229ce-83e2-4faf-8479-e368a34938b1}" status="ok">
3+
<daystart elapsed_days="4086" elapsed_seconds="62499"/>
4+
<app appid="{C166AF52-7EE9-4F08-AAA7-B4B895A9F336}" cohort="1:3:" cohortname="caroline_beta" status="ok">
5+
<ping status="ok"/>
46
<updatecheck status="ok">
57
<urls>
6-
<url codebase="https://storage.googleapis.com/chromeos-releases-public/canary-channel/canary-channel/3095.0.0/"/>
8+
<url codebase="http://dl.google.com/chromeos/caroline/10323.52.0/beta-channel/"/>
9+
<url codebase="https://dl.google.com/chromeos/caroline/10323.52.0/beta-channel/"/>
710
</urls>
8-
<manifest version="3095.0.0">
9-
<packages>
10-
<package hash="HVOmp67vBjPdvpWmOC2Uw4UDwsc=" name="chromeos_3095.0.0_x86-zgb_canary-channel_full_mp-v2.bin-df37843370ddf1e3819a2afeaa934faa.signed" required="true" size="400752559"/>
11-
</packages>
11+
<manifest version="10323.52.0">
1212
<actions>
13-
<action event="update" run="chromeos_3095.0.0_x86-zgb_canary-channel_full_mp-v2.bin-df37843370ddf1e3819a2afeaa934faa.signed"/>
14-
<action ChromeOSVersion="3095.0.0" ChromeVersion="24.0.1307.0" IsDelta="true" IsDeltaPayload="false" MaxDaysToScatter="14" MetadataSignatureRsa="xXrO/LahHlKk3YmqEf1qE0PN587Sc2IJV+FN7J7x1h49waNQIy/QwYO4LaOySgETe5JZXtkAEzzqakfJwxQ2pVfzj1GkExwjd5LTn1He2GvA73B8fKbS4bfP7dbUFwD5039xCwf1U2gezFViOiOPiVURx/pEsdhv+Cqx/3HbjIuj5au2dooSyDxLC5AnODzAKyYfAcjMuiLON+9SqmctJW+VjzdY9SbJAnkH2qqVjFyBKAXsYT+hOTIJ3MJpg8OSVxMMtGB99PxbOJ52F37d2Y5Fws/AUkNnNEsan/WRJA1kuWoS6rpeR8JQYuVhLiK2u/KpOcvMVRw3Q2VUxtcAGw==" MetadataSize="58315" event="postinstall" sha256="DIAVxoI+8NpsudUawOA5U92VHlaxQBS3ejN4EPM6T2A="/>
13+
<action event="update" run="chromeos_10323.46.0-10323.52.0_caroline_beta-channel_delta_mp.bin-f5c4e5e263c4c119d7d22e0f18a586e5.signed"/>
14+
<action ChromeOSVersion="10323.52.0" ChromeVersion="65.0.3325.148" IsDelta="true" IsDeltaPayload="true" MaxDaysToScatter="14" MetadataSignatureRsa="tkrOiIQn2GMQzjLckjiiOyuyV+RqupNW50t6JlFWOhAzWM8dm1qrJVYTYlULxTVlx4BHijbNuX7+OYk6zhRuxuceY7sUwrCM2yxERZ/sDLA5wF0u/8KLP7qrDKL2OIk9JJhF0EdLPylUAEt6vWW4pbYRFhK0girgWIPSdqdjkfHNTKWEUtcQ3iAAB8AvLNOyGP/en0makFvSVXZ8Mq95UrSwWMYFdVmWdVkyRtLYSwLaz5J45y3DQuk3YjeaHhRlH/AQ3OJXX6rjTCwgyiddAccOalwFVwrczq6AUs5S+/vWAMqi+7YfCPgjRdPPIhRJVKcIiAPb8RNXlP+rigGwew==" MetadataSize="414487" event="postinstall" sha256="kONiEAWQV7UyBjOoFBcKDz0OkUx0yRuIGzse4O6rmDs="/>
1515
</actions>
16+
<packages>
17+
<package fp="1.90e36210059057b5320633a814170a0f3d0e914c74c91b881b3b1ee0eeab983b" hash="gD1W+dPZiNEhz3f3odCtfL81Yi8=" hash_sha256="90e36210059057b5320633a814170a0f3d0e914c74c91b881b3b1ee0eeab983b" name="chromeos_10323.46.0-10323.52.0_caroline_beta-channel_delta_mp.bin-f5c4e5e263c4c119d7d22e0f18a586e5.signed" required="true" size="29981022"/>
18+
</packages>
1619
</manifest>
1720
</updatecheck>
1821
</app>

0 commit comments

Comments
 (0)