From a96b38467f6106bda77a4b28fcb0a9083c083c68 Mon Sep 17 00:00:00 2001 From: Gabriel Hernandez Date: Fri, 3 Jan 2025 14:18:15 +0000 Subject: [PATCH] fix tests --- server/service/integration_mdm_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/service/integration_mdm_test.go b/server/service/integration_mdm_test.go index b57b7847322c..fc321093df8e 100644 --- a/server/service/integration_mdm_test.go +++ b/server/service/integration_mdm_test.go @@ -11063,7 +11063,7 @@ func (s *integrationMDMTestSuite) TestVPPApps() { } assert.ElementsMatch(t, expectedApps, appResp.AppStoreApps) - getSoftwareTitleFromApp := func(app *fleet.VPPApp) uint { + getSoftwareTitleIDFromApp := func(app *fleet.VPPApp) uint { var titleID uint mysql.ExecAdhocSQL(t, s.ds, func(q sqlx.ExtContext) error { ctx := context.Background() @@ -11083,7 +11083,7 @@ func (s *integrationMDMTestSuite) TestVPPApps() { s.DoJSON("POST", "/api/latest/fleet/software/app_store_apps", &addAppStoreAppRequest{TeamID: &team.ID, AppStoreID: addedApp.AdamID, SelfService: true}, http.StatusOK, &addAppResp) s.lastActivityMatches(fleet.ActivityAddedAppStoreApp{}.ActivityName(), fmt.Sprintf(`{"team_name": "%s", "software_title": "%s", "software_title_id": %d, "app_store_id": "%s", "team_id": %d, "platform": "%s", "self_service": true}`, team.Name, - addedApp.Name, getSoftwareTitleFromApp(addedApp), addedApp.AdamID, team.ID, addedApp.Platform), 0) + addedApp.Name, getSoftwareTitleIDFromApp(addedApp), addedApp.AdamID, team.ID, addedApp.Platform), 0) // Now we should be filtering out the app we added to team 1 appResp = getAppStoreAppsResponse{} @@ -11134,7 +11134,7 @@ func (s *integrationMDMTestSuite) TestVPPApps() { http.StatusOK, &addAppResp) s.lastActivityMatches(fleet.ActivityAddedAppStoreApp{}.ActivityName(), fmt.Sprintf(`{"team_name": "%s", "software_title": "%s", "software_title_id": %d, "app_store_id": "%s", "team_id": %d, "platform": "%s", "self_service": false}`, team.Name, - addedApp.Name, getSoftwareTitleFromApp(addedApp), addedApp.AdamID, team.ID, addedApp.Platform), 0) + addedApp.Name, getSoftwareTitleIDFromApp(addedApp), addedApp.AdamID, team.ID, addedApp.Platform), 0) // Now we should be filtering out the app we added to team 1 appResp = getAppStoreAppsResponse{} @@ -11208,7 +11208,7 @@ func (s *integrationMDMTestSuite) TestVPPApps() { s.lastActivityMatches( fleet.ActivityAddedAppStoreApp{}.ActivityName(), fmt.Sprintf(`{"team_name": "%s", "software_title": "%s", "software_title_id": %d, "app_store_id": "%s", "team_id": %d, "platform": "%s", "self_service": true}`, team.Name, - appSelfService.Name, getSoftwareTitleFromApp(appSelfService), appSelfService.AdamID, team.ID, appSelfService.Platform), + appSelfService.Name, getSoftwareTitleIDFromApp(appSelfService), appSelfService.AdamID, team.ID, appSelfService.Platform), 0, ) listSw = listSoftwareTitlesResponse{} @@ -11223,7 +11223,7 @@ func (s *integrationMDMTestSuite) TestVPPApps() { s.lastActivityMatches( fleet.ActivityAddedAppStoreApp{}.ActivityName(), fmt.Sprintf(`{"team_name": "%s", "software_title": "%s", "software_title_id": %d, "app_store_id": "%s", "team_id": %d, "platform": "%s", "self_service": false}`, team.Name, - app.Name, getSoftwareTitleFromApp(app), app.AdamID, team.ID, app.Platform), + app.Name, getSoftwareTitleIDFromApp(app), app.AdamID, team.ID, app.Platform), 0, ) listSw = listSoftwareTitlesResponse{}