From 1e7645ea13cbafa7290445d3e8777602a8e8cc07 Mon Sep 17 00:00:00 2001 From: Martin Angers Date: Tue, 2 Apr 2024 15:40:26 -0400 Subject: [PATCH] Update wording of error message --- server/fleet/apple_mdm.go | 2 +- server/service/integration_ddm_test.go | 2 +- server/service/integration_mdm_test.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/fleet/apple_mdm.go b/server/fleet/apple_mdm.go index 1ee60cb3b9..22bd82d6d4 100644 --- a/server/fleet/apple_mdm.go +++ b/server/fleet/apple_mdm.go @@ -597,7 +597,7 @@ func (r *MDMAppleRawDeclaration) ValidateUserProvided() error { // Check against types we don't allow if r.Type == `com.apple.configuration.softwareupdate.enforcement.specific` { - return NewInvalidArgumentError(r.Type, "Declaration profile can’t include OS updates settings. OS updates coming soon!") + return NewInvalidArgumentError(r.Type, "Declaration profile can’t include OS updates settings. To control these settings, go to OS updates.") } if _, forbidden := ForbiddenDeclTypes[r.Type]; forbidden { diff --git a/server/service/integration_ddm_test.go b/server/service/integration_ddm_test.go index 43a9e798ff..67d316ea59 100644 --- a/server/service/integration_ddm_test.go +++ b/server/service/integration_ddm_test.go @@ -62,7 +62,7 @@ func (s *integrationMDMTestSuite) TestAppleDDMBatchUpload() { }}, http.StatusUnprocessableEntity) errMsg = extractServerErrorText(res.Body) - require.Contains(t, errMsg, "Declaration profile can’t include OS updates settings. OS updates coming soon!") + require.Contains(t, errMsg, "Declaration profile can’t include OS updates settings. To control these settings, go to OS updates.") // Types from our list of forbidden types should fail for ft := range fleet.ForbiddenDeclTypes { diff --git a/server/service/integration_mdm_test.go b/server/service/integration_mdm_test.go index 92c1053185..172e07dd33 100644 --- a/server/service/integration_mdm_test.go +++ b/server/service/integration_mdm_test.go @@ -8935,7 +8935,7 @@ func (s *integrationMDMTestSuite) TestMDMConfigProfileCRUD() { mysql.ExecAdhocSQL(t, s.ds, func(q sqlx.ExtContext) error { stmt := ` SELECT COALESCE(apple_profile_uuid, windows_profile_uuid) as profile_uuid, label_name, COALESCE(label_id, 0) as label_id - FROM mdm_configuration_profile_labels + FROM mdm_configuration_profile_labels UNION SELECT apple_declaration_uuid as profile_uuid, label_name, COALESCE(label_id, 0) as label_id FROM mdm_declaration_labels ORDER BY profile_uuid, label_name;` return sqlx.SelectContext(context.Background(), q, &profileLabels, stmt) @@ -10919,7 +10919,7 @@ func (s *integrationMDMTestSuite) TestBatchSetMDMProfiles() { {Name: "N4", Contents: declarationForTestWithType("D1", "com.apple.configuration.softwareupdate.enforcement.specific")}, }}, http.StatusUnprocessableEntity, "team_id", strconv.Itoa(int(tm.ID))) errMsg := extractServerErrorText(res.Body) - require.Contains(t, errMsg, "Declaration profile can’t include OS updates settings. OS updates coming soon!") + require.Contains(t, errMsg, "Declaration profile can’t include OS updates settings. To control these settings, go to OS updates.") // invalid JSON res = s.Do("POST", "/api/v1/fleet/mdm/profiles/batch", batchSetMDMProfilesRequest{Profiles: []fleet.MDMProfileBatchPayload{