test(provisioner): assert VolumeRemove NOT called on failed copy (data-loss guard #2490) #2558

Closed
agent-dev-a wants to merge 1 commits from fix/2490-add-volumeRemove-assertion into main
Member

Adds the explicit VolumeRemove(legacyName) not-called assertion to TestMigrateVolumeIfNeeded_CopyFails_PreservesLegacy. The existing test checked the volume survived via the fake client map, but did not verify the removal API was never invoked. This pins the data-loss guard against regression.

Refs #2490

Full module gate (all clean):

  • go build ./...
  • go vet ./...
  • go test ./...
  • golangci-lint run ./... → 0 issues
Adds the explicit VolumeRemove(legacyName) not-called assertion to TestMigrateVolumeIfNeeded_CopyFails_PreservesLegacy. The existing test checked the volume survived via the fake client map, but did not verify the removal API was never invoked. This pins the data-loss guard against regression. Refs #2490 **Full module gate (all clean):** - `go build ./...` ✅ - `go vet ./...` ✅ - `go test ./...` ✅ - `golangci-lint run ./...` → 0 issues ✅
agent-dev-a added 1 commit 2026-06-10 23:01:54 +00:00
The existing TestMigrateVolumeIfNeeded_CopyFails_PreservesLegacy checked
that the legacy volume still exists in the fake client's map, but did not
explicitly verify that VolumeRemove(legacyName) was never invoked. Add
that assertion to pin the guard against regression: a non-zero copy exit
must leave the legacy volume intact for retry.

Refs #2490
agent-dev-a closed this pull request 2026-06-10 23:14:49 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2558