mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
DCSW: Verify Windows SCEP profiles without validation (#34852)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #34249 # Checklist for submitter If some of the following don't apply, delete the relevant line. ## Testing - [x] Added/updated automated tests - [x] QA'd all new/changed functionality manually
This commit is contained in:
parent
f0e1b1425f
commit
d2d918dd49
2 changed files with 27 additions and 0 deletions
|
|
@ -170,6 +170,13 @@ func compareResultsToExpectedProfiles(ctx context.Context, logger kitlog.Logger,
|
|||
}
|
||||
|
||||
err = LoopOverExpectedHostProfiles(ctx, logger, ds, host, func(profile *fleet.ExpectedMDMProfile, ref, locURI, wantData string) {
|
||||
if strings.HasPrefix(locURI, "./Device/Vendor/MSFT/ClientCertificateInstall/SCEP") {
|
||||
verified[profile.Name] = struct{}{}
|
||||
// We delete here if by some accident it was marked as missing before
|
||||
delete(missing, profile.Name)
|
||||
return
|
||||
}
|
||||
|
||||
// if we didn't get a status for a LocURI, mark the profile as missing.
|
||||
gotStatus, ok := profileResults.cmdRefToStatus[ref]
|
||||
if !ok {
|
||||
|
|
|
|||
|
|
@ -594,6 +594,26 @@ func TestVerifyHostMDMProfilesHappyPaths(t *testing.T) {
|
|||
toFail: []string{},
|
||||
toRetry: []string{},
|
||||
},
|
||||
{
|
||||
name: "scep profile instantly verifies",
|
||||
hostProfiles: []hostProfile{
|
||||
{"N1", syncml.ForTestWithData([]syncml.TestCommand{
|
||||
{
|
||||
Verb: "Replace",
|
||||
LocURI: "./Device/Vendor/MSFT/ClientCertificateInstall/SCEP/bogus-key-value",
|
||||
Data: "non related data",
|
||||
},
|
||||
}), 0},
|
||||
},
|
||||
existingProfiles: []fleet.HostMDMWindowsProfile{
|
||||
{
|
||||
ProfileUUID: "uuid-N1",
|
||||
Name: "N1",
|
||||
Status: &fleet.MDMDeliveryPending,
|
||||
},
|
||||
},
|
||||
toVerify: []string{"N1"},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range cases {
|
||||
|
|
|
|||
Loading…
Reference in a new issue