Fix UpdateAttempter unittests.
The passed nullptr references are now used during Init(). This patch
fixes the unittests by properly initializing the UpdateAttempter
under test.
Bug: None
TEST=FEATURES=test emerge-link update_engine
TBR=garnold@google.com
Change-Id: I4c5fd979276775cc3ee92accbd2924b8508c4abd
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 747a974..10fb352 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -268,7 +268,7 @@
EXPECT_TRUE(utils::GetBootId(&boot_id));
fake_prefs.SetString(kPrefsUpdateCompletedOnBootId, boot_id);
fake_system_state_.set_prefs(&fake_prefs);
- UpdateAttempterUnderTest attempter(&fake_system_state_, nullptr,
+ UpdateAttempterUnderTest attempter(&fake_system_state_, &libcros_proxy_,
&debugd_proxy_mock_);
attempter.Init();
EXPECT_EQ(UpdateStatus::UPDATED_NEED_REBOOT, attempter.status());
@@ -936,7 +936,7 @@
TEST_F(UpdateAttempterTest, BootTimeInUpdateMarkerFile) {
UpdateAttempterUnderTest attempter{&fake_system_state_,
- nullptr, // libcros_proxy
+ &libcros_proxy_,
&debugd_proxy_mock_};
FakeClock fake_clock;
fake_clock.SetBootTime(Time::FromTimeT(42));