@@ -126,7 +126,7 @@ TEST_F(ApiClientTest, CheckIn) {
126126 auto result = client.CheckIn ();
127127
128128 auto events = getDeviceGateway ().getEvents ();
129- ASSERT_EQ (2 , events.size ());
129+ ASSERT_EQ (3 , events.size ());
130130 auto val = getDeviceGateway ().readSotaToml ();
131131 ASSERT_NE (std::string::npos, val.find (" [pacman]" ));
132132
@@ -141,7 +141,7 @@ TEST_F(ApiClientTest, CheckIn) {
141141 EXPECT_CALL (*lite_client, callback (testing::StrEq (" check-for-update-pre" ), testing::_, testing::StrEq (" " ))).Times (1 );
142142 EXPECT_CALL (*lite_client, callback (testing::StrEq (" check-for-update-post" ), testing::_, testing::StrEq (" OK" )));
143143 result = client.CheckIn ();
144- ASSERT_EQ (0 , getDeviceGateway ().getEvents ().size ());
144+ ASSERT_EQ (1 , getDeviceGateway ().getEvents ().size ());
145145 ASSERT_EQ (" " , getDeviceGateway ().readSotaToml ());
146146 ASSERT_EQ (CheckInResult::Status::Ok, result.status );
147147 ASSERT_EQ (2 , result.Targets ().size ());
@@ -164,7 +164,7 @@ TEST_F(ApiClientTest, CheckInLocal) {
164164
165165 // No communication is done with the device gateway inside CheckInLocal
166166 auto events = getDeviceGateway ().getEvents ();
167- ASSERT_EQ (0 , events.size ());
167+ ASSERT_EQ (1 , events.size ());
168168 ASSERT_EQ (" " , getDeviceGateway ().readSotaToml ());
169169
170170 ASSERT_EQ (CheckInResult::Status::Ok, result.status );
@@ -173,7 +173,7 @@ TEST_F(ApiClientTest, CheckInLocal) {
173173 auto new_target = createTarget ();
174174 tuf_repo_.updateBundleMeta (new_target.filename ());
175175 result = client.CheckInLocal (&local_update_source_);
176- ASSERT_EQ (0 , getDeviceGateway ().getEvents ().size ());
176+ ASSERT_EQ (2 , getDeviceGateway ().getEvents ().size ());
177177 ASSERT_EQ (" " , getDeviceGateway ().readSotaToml ());
178178 ASSERT_EQ (CheckInResult::Status::Ok, result.status );
179179 ASSERT_EQ (2 , result.Targets ().size ());
@@ -187,7 +187,7 @@ TEST_F(ApiClientTest, CheckInWithoutTargetImport) {
187187 auto result = client.CheckIn ();
188188
189189 auto events = getDeviceGateway ().getEvents ();
190- ASSERT_EQ (2 , events.size ());
190+ ASSERT_EQ (3 , events.size ());
191191 auto val = getDeviceGateway ().readSotaToml ();
192192 ASSERT_NE (std::string::npos, val.find (" [pacman]" ));
193193
@@ -199,7 +199,7 @@ TEST_F(ApiClientTest, CheckInWithoutTargetImport) {
199199
200200 auto new_target = createTarget ();
201201 result = client.CheckIn ();
202- ASSERT_EQ (0 , getDeviceGateway ().getEvents ().size ());
202+ ASSERT_EQ (1 , getDeviceGateway ().getEvents ().size ());
203203 ASSERT_EQ (" " , getDeviceGateway ().readSotaToml ());
204204 ASSERT_EQ (CheckInResult::Status::Ok, result.status );
205205 ASSERT_EQ (1 , result.Targets ().size ());
@@ -603,7 +603,8 @@ TEST_F(ApiClientTest, CheckInCurrent) {
603603 auto result = client.CheckIn ();
604604
605605 auto events = getDeviceGateway ().getEvents ();
606- ASSERT_EQ (2 , events.size ());
606+ // Network info + System info + MetadataUpdateCompleted event
607+ ASSERT_EQ (3 , events.size ());
607608 auto val = getDeviceGateway ().readSotaToml ();
608609 ASSERT_NE (std::string::npos, val.find (" [pacman]" ));
609610
0 commit comments