Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ghernandez345 committed Jan 3, 2025
1 parent 141e439 commit a96b384
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/service/integration_mdm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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{}
Expand Down Expand Up @@ -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{}
Expand Down Expand Up @@ -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{}
Expand All @@ -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{}
Expand Down

0 comments on commit a96b384

Please sign in to comment.