fleet/server/mock
Magnus Jensen 57566301e1
Wait for expected profiles to be sent before releasing device (#31381)
This PR addresses the concern of potentially being able to release a
device before any profile is sent, and the check thinking there is no
pending. It addresses both the release worker, but also the orbit setup
experience endpoint, even though that is less likely.

_Checked the query against my host on dogfood where it took 0.1 seconds,
with the single host._

fixes: #31143 

_I also ended up putting my main test in a new file
`integration_mdm_release_worker_test.go` and decided not to do fancy
setup, as there is only one test so no recurring things, and based on
our retro talk also moved the setup experience related tests inside of
`integration_mdm_dep_test.go` into their separate file
`integration_mdm_setup_experience_test.go`_

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [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/guides/committing-changes.md#changes-files)
for more information.

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests

- [ ] QA'd all new/changed functionality manually (No, since this one is
hard to reproduce, but instead wrote an integration test before doing
the change to verify the behaviour.)
2025-07-31 17:50:57 +02:00
..
digicert GitOps support for DigiCert and Custom SCEP (#27229) 2025-03-20 11:36:00 -05:00
mdm Add VPP install automation in GitOps (#25400) 2025-01-14 12:52:39 -06:00
mockimpl Refactoring Android datastore interface (#26982) 2025-03-13 14:28:52 -05:00
mockresult Move external dependency mockimpl to monorepo (#15863) 2024-01-10 11:46:24 -03:00
nanodep Move nanodep dependency in monorepo (#16984) 2024-02-26 10:26:00 -05:00
scep Add custom SCEP configs (#27045) 2025-03-14 12:16:51 -05:00
software Added signed URLs (#25197) 2025-01-09 12:56:54 -06:00
datastore.go Switch vulns cron false positive clear to clear vulns based on when the vulns run started, rather than based on periodicity (#31364) 2025-07-29 10:14:14 -05:00
datastore_installers.go update mockimpl version to allow concurrent mock calls (#9989) 2023-02-21 16:36:06 -03:00
datastore_mock.go Wait for expected profiles to be sent before releasing device (#31381) 2025-07-31 17:50:57 +02:00
datastore_users_helpers.go Add support for context in datastore/mysql layer (#1962) 2021-09-14 08:11:07 -04:00
errors.go Remove unneeded interfaces (#1779) 2021-08-24 18:49:56 -03:00