fleet/server/mdm/microsoft
Victor Lyuboslavsky 086099631e
Fix issue where Windows MDM profiles are not sent to offline hosts (#25619)
For #25615 

The actual fix is these two lines, where we only delete the command from
the queue for the specific host we're processing:
```
const dequeueCommandsStmt = `DELETE FROM windows_mdm_command_queue WHERE enrollment_id = ? AND command_uuid IN (?)`
stmt, params, err = sqlx.In(dequeueCommandsStmt, enrolledDevice.ID, matchingUUIDs)
```

Everything else is tests, cleanup, refactoring for readability.

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Added/updated automated tests
- [x] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality
2025-01-21 09:59:32 -06:00
..
admx Fixes issue verifying Windows CSP profiles that contain ADMX policies. (#25528) 2025-01-17 14:56:25 -06:00
syncml Fix polling schedule for Windows MDM (#16104) 2024-01-16 09:05:19 -05:00
microsoft_mdm.go implement OTA enrollment (#21942) 2024-09-10 16:52:17 -03:00
profile_verifier.go Fix issue where Windows MDM profiles are not sent to offline hosts (#25619) 2025-01-21 09:59:32 -06:00
profile_verifier_test.go Fix issue where Windows MDM profiles are not sent to offline hosts (#25619) 2025-01-21 09:59:32 -06:00
wstep.go implement OTA enrollment (#21942) 2024-09-10 16:52:17 -03:00
wstep_csr.go Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
wstep_csr_test.go Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
wstep_test.go Move nanomdm dependency in monorepo (#16015) 2024-01-11 23:28:48 -03:00