Fill out more test details on device-scoped install results endpoint (#28637)

For #28411.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Added/updated automated tests
This commit is contained in:
Ian Littman 2025-04-29 09:46:56 -05:00 committed by GitHub
parent 9e535425cd
commit cc58b14665
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10672,7 +10672,9 @@ func (s *integrationEnterpriseTestSuite) TestListHostSoftware() {
getDeviceInstallResult := getSoftwareInstallResultsResponse{}
err = json.NewDecoder(res.Body).Decode(&getDeviceInstallResult)
require.NoError(t, err)
require.Equal(t, getDeviceInstallResult.Results.SoftwareTitle, "ruby")
require.Equal(t, "ruby", getDeviceInstallResult.Results.SoftwareTitle)
require.Equal(t, host.ID, getDeviceInstallResult.Results.HostID)
require.Equal(t, fleet.SoftwareInstallPending, getDeviceInstallResult.Results.Status)
s.DoRawNoAuth("GET", "/api/latest/fleet/device/"+token+"/software/install/nope/results", nil, http.StatusNotFound)
s.DoRawNoAuth("GET", "/api/latest/fleet/device/"+otherToken+"/software/install/"+getDeviceSw.Software[2].SoftwarePackage.LastInstall.InstallUUID+"/results", nil, http.StatusNotFound)