Allow failed profiles to become verified if subsequently reported by osquery (#13343)

This commit is contained in:
gillespi314 2023-08-18 10:34:13 -05:00 committed by GitHub
parent a1b8226a15
commit d140a57355
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -1661,14 +1661,14 @@ SET
status = ?
WHERE
host_uuid = ?
AND status = ?
AND status IN(?)
AND operation_type = ?
AND profile_identifier IN(?)`
args := []interface{}{
fleet.MDMAppleDeliveryVerified,
host.UUID,
fleet.MDMAppleDeliveryVerifying,
[]interface{}{fleet.MDMAppleDeliveryVerifying, fleet.MDMAppleDeliveryFailed},
fleet.MDMAppleOperationTypeInstall,
identifiers,
}

View File

@ -4838,7 +4838,7 @@ func TestMDMProfileVerification(t *testing.T) {
{
name: "FailedThenFoundExpected",
initialStatus: fleet.MDMAppleDeliveryFailed,
expectedStatus: fleet.MDMAppleDeliveryFailed, // no change
expectedStatus: fleet.MDMAppleDeliveryVerified, // failed can become verified if found later
expectedDetail: "",
},
}
@ -4901,7 +4901,7 @@ func TestMDMProfileVerification(t *testing.T) {
{
name: "FailedThenFoundExpectedAndUnexpected",
initialStatus: fleet.MDMAppleDeliveryFailed,
expectedStatus: fleet.MDMAppleDeliveryFailed, // no change
expectedStatus: fleet.MDMAppleDeliveryVerified, // failed can become verified if found later
expectedDetail: "",
},
}