Repository navigation
apply, pods, web: tests from a mutation-testing campaign - #108
Merged
Merged
Conversation
Pin behaviour surviving mutants showed untested: a failed listing's retry round and error keeping, stops before or during a round and RoundsSkipped, power items left untouched, a torn-down item resuming at its clone, Held refusals in a step, unfollowable tasks with no VM or a lock still held, resent snapshot requests, and half-deleted and leftover-disk error texts.
…ants Pin behaviour that mutation testing showed unchecked: reboot of a stopped VM, clone and delete events, failures after a cancel, retire on a moved or replaced previous version, probe of a locked clone target, rebuild of a team VM gone since planning, guest agent waits and verify reports, cleanup order, budget and per-copy outcomes, unconfirmed deletes, leftover base disks under the storage-ops slot, and the copy-stop and convert waits.
Every clone passes its target VMID to taskUPID, so a zero vmid never comes with a clone's UPID; the check could not fail.
…outer's octet isn't
A template is read only when it is in a slot's pool, and the pool branch handles it first, so the skip could never run.
… no VMs Kills surviving mutants in confirm.go and jobpages.go: a confirm at another environment's Add hosts path is refused, a wrong typed confirm says what was typed, the submit flash names one pod or several, and a job with no VMs is cancelled only by whoever started it.
…and disk-only teardowns
ParseSet already refuses an empty set, so the check could not fail.
…onversion mutants
Run the stop-while-locked and leftover-disk tests under synctest, gate the copy-stop test on its event, and stop pinning cleanup's incidental delete order.
podstest.Guest gains SSHExit and the Fake records SSH checks, replacing liveaddr_test's sshAgent wrapper. Drop two EnvEdit tests TestEnvEditItem already covers, share a hostSpecs helper in envplan tests, and correct Environments' docstring on templates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
124 behavioural tests (apply 39, pods 76, web 9) plus stronger existing ones,
written to kill mutants gremlins left alive in internal/apply, internal/pods and
the internal/web review and authorization paths. Production code changes are only
three deletions of checks that could never fail, each in its own commit
(unfollowable's qmclone check, Environments' template skip, SetOfPattern's
empty-set check; that last commit's message credits ParseSet, but it's
SetOfPattern's own
rest == ""check, after trimming, that already refuses an emptyset). The timing-sensitive tests run under testing/synctest or wait on signals, not
sleeps. Scores rose from 84% to 93% (apply) and 85% to 98% (pods) by gremlins'
efficacy, and 52% to 96% on the targeted web paths. Every mutant still alive has a
recorded reason (equivalent, a guard kept on purpose, or not compilable), except
templates.go:242:33, which PR 3's fix kills. Notable gap closed: nothing caught a
mutant that let anyone with privileges cancel another person's job with no VMs;
the code was right, and TestCancelOfAJobWithNoVMs now pins it.
Stacked on #105 (
fix/go-1.27.4); review only this branch's commits. Merge after that PR.