Split the ReportUpdateAttemptMetrics into two functions
Move out the report download metrics into a new function so that
ReportUpdateAttemptMetrics has a reasonable number of parameters.
Create mocks for these two functions also.
Test: unittest pass
Change-Id: Ib9fc33d282a448c7e2d19bb7e7c06619efc2a278
diff --git a/fake_system_state.h b/fake_system_state.h
index 990e227..67ad3aa 100644
--- a/fake_system_state.h
+++ b/fake_system_state.h
@@ -190,7 +190,7 @@
return &fake_hardware_;
}
- inline testing::NiceMock<MockMetrics>* mock_metrics_reporter() {
+ inline testing::NiceMock<MockMetricsReporter>* mock_metrics_reporter() {
CHECK(metrics_reporter_ == &mock_metrics_reporter_);
return &mock_metrics_reporter_;
}
@@ -236,7 +236,7 @@
FakeClock fake_clock_;
testing::NiceMock<MockConnectionManager> mock_connection_manager_;
FakeHardware fake_hardware_;
- testing::NiceMock<MockMetrics> mock_metrics_reporter_;
+ testing::NiceMock<MockMetricsReporter> mock_metrics_reporter_;
testing::NiceMock<MockPrefs> mock_prefs_;
testing::NiceMock<MockPrefs> mock_powerwash_safe_prefs_;
testing::NiceMock<MockPayloadState> mock_payload_state_;