Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix flaky test in
ClusterMachineConfigStatus
unit tests
The test `TestSchematicChanges` was flaky, as it was doing the following: 1. Trigger one or more `factory.talos.dev` build image generations & talos node upgrades by modifying resources 2. Capture these upgrade calls 3. Assert the build image in these calls (to be one or more with, always the expected image) 4. Clear captured upgrade calls 5. Trigger one or more `ghcr.io` build image generations & talos node upgrades by modifying resources 6. Capture these upgrade calls 7. Assert the build image in these new calls (to be one or more with, always the expected image) The problem was, between step 4 and 7, an old `factory.talos.dev` build image could sometimes still be captured due to the nature of controllers asynchronously reconciling resources. Replace this logic by not clearing the upgrade requests at all, instead, simply ignoring the previous image's preceding captured requests in step 7. Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
- Loading branch information