update_engine: add variable for DeviceQuickFixBuildToken policy
This CL makes DeviceQuickFixBuildToken policy visible in update_manager
which would be used in a follow up CL to skip applying
DeviceAutoUpdateTimeRestrictions when a quick fix build token is set.
This CL also adds quick fix token in UpdateCheckParams which is used
by UpdateAttempter to pass the token in OmahaRequestParams.
BUG=chromium:1117450
TEST=FEATURES=test emerge-${BOARD} update_engine
Change-Id: If43ad8cd2955bbeb1cbd1dcacac79742fa0a6a20
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2521189
Commit-Queue: Saurabh Nijhara <snijhara@google.com>
Tested-by: Saurabh Nijhara <snijhara@google.com>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/update_manager/chromeos_policy_unittest.cc b/update_manager/chromeos_policy_unittest.cc
index 53e8a52..97a4599 100644
--- a/update_manager/chromeos_policy_unittest.cc
+++ b/update_manager/chromeos_policy_unittest.cc
@@ -264,6 +264,8 @@
new string("foo-channel"));
fake_state_.device_policy_provider()->var_release_lts_tag()->reset(
new string("foo-hint"));
+ fake_state_.device_policy_provider()->var_quick_fix_build_token()->reset(
+ new string("foo-token"));
UpdateCheckParams result;
ExpectPolicyStatus(
@@ -273,6 +275,7 @@
EXPECT_EQ(5, result.rollback_allowed_milestones);
EXPECT_EQ("foo-channel", result.target_channel);
EXPECT_EQ("foo-hint", result.lts_tag);
+ EXPECT_EQ("foo-token", result.quick_fix_build_token);
EXPECT_FALSE(result.interactive);
}