Fix TestVPPAppScheduledUpdates (#38603)

Fixing `TestVPPAppScheduledUpdates` on `main` (broken by the addition of
version checking when verifying VPP installs/updates).

Fix is about setting the VPP proxy versions data inside the sub-tests vs
only once in the main test (because each sub-test modifies the latest
version).
This commit is contained in:
Lucas Manuel Rodriguez 2026-01-21 18:34:03 -03:00 committed by GitHub
parent 2ecec2b0aa
commit 3927fb60f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1914,12 +1914,12 @@ func (s *integrationMDMTestSuite) TestVPPAppScheduledUpdates() {
// Reset the VPP proxy data to what it was before this test
s.registerResetVPPProxyData(t)
// Set an iOS and iPadOS app on the VPP response.
s.appleVPPProxySrvData = map[string]string{
"1": `{"id": "1", "attributes": {"name": "App 1", "platformAttributes": {"ios": {"bundleId": "app-1", "artwork": {"url": "https://example.com/images/1/{w}x{h}.{f}"}, "latestVersionInfo": {"versionDisplay": "1.0.0"}}}, "deviceFamilies": ["iphone", "ipad"]}}`,
}
vppAutoUpdateTest := func(t *testing.T, team *fleet.Team, host *fleet.Host, deviceClient *mdmtest.TestAppleMDMClient) {
// Set an iOS and iPadOS app on the VPP response.
s.appleVPPProxySrvData = map[string]string{
"1": `{"id": "1", "attributes": {"name": "App 1", "platformAttributes": {"ios": {"bundleId": "app-1", "artwork": {"url": "https://example.com/images/1/{w}x{h}.{f}"}, "latestVersionInfo": {"versionDisplay": "1.0.0"}}}, "deviceFamilies": ["iphone", "ipad"]}}`,
}
if team.ID != 0 {
// Transfer host to team.
s.Do("POST", "/api/latest/fleet/hosts/transfer",