mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
fix: expect InvalidSnapshot.NotFound for cross-account DeleteSnapshot
Snapshot metadata is now keyed by owning account, so a snapshot outside the caller's prefix is absent rather than forbidden. The e2e assertion still encoded the pre-partitioning UnauthorizedOperation contract.
This commit is contained in:
@@ -481,9 +481,10 @@ func runAccountScoping(t *testing.T, fix *Fixture) {
|
||||
assert.Equal(t, alpha.AccountID, aws.StringValue(alphaSnaps.Snapshots[0].OwnerId),
|
||||
"alpha snapshot OwnerId mismatch")
|
||||
|
||||
// DeleteSnapshot returns UnauthorizedOperation (not NotFound) across accounts.
|
||||
harness.Step(t, "cross-account delete-snapshot blocked (UnauthorizedOperation)")
|
||||
harness.ExpectError(t, "UnauthorizedOperation", func() error {
|
||||
// Snapshot metadata is keyed by owning account, so a snapshot outside the
|
||||
// caller's prefix is absent rather than forbidden.
|
||||
harness.Step(t, "cross-account delete-snapshot blocked (InvalidSnapshot.NotFound)")
|
||||
harness.ExpectError(t, "InvalidSnapshot.NotFound", func() error {
|
||||
_, err := beta.Client.EC2.DeleteSnapshot(&ec2.DeleteSnapshotInput{
|
||||
SnapshotId: aws.String(alphaSnap),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user