Skip to content

Commit

Permalink
Confirm that config profiles summary is no longer behind MDM wall
Browse files Browse the repository at this point in the history
  • Loading branch information
iansltx committed Nov 23, 2024
1 parent 047d549 commit b63b725
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/service/integration_core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8638,6 +8638,11 @@ func (s *integrationTestSuite) TestGetHostDiskEncryption() {
require.Equal(t, hostLin.ID, getHostResp.Host.ID)
require.True(t, *getHostResp.Host.DiskEncryptionEnabled)

// should succeed as we no longer require MDM to access this endpoint, as Linux encryption doesn't require MDM
var profiles getMDMProfilesSummaryResponse
s.DoJSON("GET", "/api/latest/fleet/configuration_profiles/summary", getMDMProfilesSummaryRequest{}, http.StatusOK, &profiles)
s.DoJSON("GET", "/api/latest/fleet/mdm/profiles/summary", getMDMProfilesSummaryRequest{}, http.StatusOK, &profiles)

// set unencrypted for all hosts
require.NoError(t, s.ds.SetOrUpdateHostDisksEncryption(context.Background(), hostWin.ID, false))
require.NoError(t, s.ds.SetOrUpdateHostDisksEncryption(context.Background(), hostMac.ID, false))
Expand All @@ -8653,7 +8658,7 @@ func (s *integrationTestSuite) TestGetHostDiskEncryption() {
require.Equal(t, hostMac.ID, getHostResp.Host.ID)
require.False(t, *getHostResp.Host.DiskEncryptionEnabled)

// Linux does not return false, it omits the field when false
// Linux may omit the field when false
getHostResp = getHostResponse{}
s.DoJSON("GET", fmt.Sprintf("/api/latest/fleet/hosts/%d", hostLin.ID), nil, http.StatusOK, &getHostResp)
require.Equal(t, hostLin.ID, getHostResp.Host.ID)
Expand Down

0 comments on commit b63b725

Please sign in to comment.