update_engine: Update of unit test according to change in libbrillo
The signature for LoadPolicy has changed in libbrillo and this
change updates the unit test for that.
BUG=chromium:305457
BUG=b:231677312
TEST=Unit test pass
Cq-Depend: 4020511
Change-Id: Ie59671468cf8634f8528821ca0d7ec0c82a44935
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/4030398
Auto-Submit: Igor <[email protected]>
Tested-by: Igor <[email protected]>
Reviewed-by: Jae Hoon Kim <[email protected]>
Commit-Queue: Igor <[email protected]>
diff --git a/cros/update_attempter_unittest.cc b/cros/update_attempter_unittest.cc
index ed7dc5f..bb4bc1c 100644
--- a/cros/update_attempter_unittest.cc
+++ b/cros/update_attempter_unittest.cc
@@ -790,7 +790,7 @@
// Expect that the device policy is loaded by the |UpdateAttempter| at some
// point by calling |RefreshDevicePolicy()|.
auto device_policy = std::make_unique<policy::MockDevicePolicy>();
- EXPECT_CALL(*device_policy, LoadPolicy())
+ EXPECT_CALL(*device_policy, LoadPolicy(false))
.Times(testing::AtLeast(1))
.WillRepeatedly(Return(true));
attempter_.policy_provider_.reset(
@@ -823,7 +823,7 @@
bool valid_slot) {
// Create a device policy so that we can change settings.
auto device_policy = std::make_unique<policy::MockDevicePolicy>();
- EXPECT_CALL(*device_policy, LoadPolicy()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*device_policy, LoadPolicy(false)).WillRepeatedly(Return(true));
FakeSystemState::Get()->set_device_policy(device_policy.get());
if (enterprise_rollback) {
// We return an empty owner as this is an enterprise.
@@ -1116,7 +1116,7 @@
int64_t scatter_factor_in_seconds = 36000;
auto device_policy = std::make_unique<policy::MockDevicePolicy>();
- EXPECT_CALL(*device_policy, LoadPolicy()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*device_policy, LoadPolicy(false)).WillRepeatedly(Return(true));
FakeSystemState::Get()->set_device_policy(device_policy.get());
EXPECT_CALL(*device_policy, GetScatterFactorInSeconds(_))
@@ -1152,7 +1152,7 @@
int64_t scatter_factor_in_seconds = 10;
auto device_policy = std::make_unique<policy::MockDevicePolicy>();
- EXPECT_CALL(*device_policy, LoadPolicy()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*device_policy, LoadPolicy(false)).WillRepeatedly(Return(true));
FakeSystemState::Get()->set_device_policy(device_policy.get());
EXPECT_CALL(*device_policy, GetScatterFactorInSeconds(_))
@@ -1211,7 +1211,7 @@
int64_t scatter_factor_in_seconds = 50;
auto device_policy = std::make_unique<policy::MockDevicePolicy>();
- EXPECT_CALL(*device_policy, LoadPolicy()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*device_policy, LoadPolicy(false)).WillRepeatedly(Return(true));
FakeSystemState::Get()->set_device_policy(device_policy.get());
EXPECT_CALL(*device_policy, GetScatterFactorInSeconds(_))
@@ -1246,7 +1246,7 @@
attempter_.scatter_factor_ = base::Seconds(20);
auto device_policy = std::make_unique<policy::MockDevicePolicy>();
- EXPECT_CALL(*device_policy, LoadPolicy()).WillRepeatedly(Return(true));
+ EXPECT_CALL(*device_policy, LoadPolicy(false)).WillRepeatedly(Return(true));
FakeSystemState::Get()->set_device_policy(device_policy.get());
EXPECT_CALL(*device_policy, GetDeviceUpdateStagingSchedule(_))
.WillRepeatedly(DoAll(SetArgPointee<0>(schedule), Return(true)));