Skip to content

Commit

Permalink
fix(test): allow delete random snapshot action (kopia#3987)
Browse files Browse the repository at this point in the history
Addresses failure introduced in kopia#3963

Change: allow `delete-random-snapID` action in the function `tryDeleteAction`.
Test: Manual local run was successful.
  • Loading branch information
chaitalisg authored Jul 16, 2024
1 parent de29856 commit b0814ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/robustness/multiclient_test/multiclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,14 @@ func tryRandomAction(ctx context.Context, t *testing.T, opts engine.ActionOpts)
}

// tryDeleteAction runs the given delete action,
// delete-files or delete-random-subdirectory
// delete-files or delete-random-subdirectory or delete-random-snapID
// with options and masks no-op errors, and asserts when called for any other action.
func tryDeleteAction(ctx context.Context, t *testing.T, action engine.ActionKey, actionOpts map[string]string) {
t.Helper()
eligibleActionsList := []engine.ActionKey{
engine.DeleteDirectoryContentsActionKey,
engine.DeleteRandomSubdirectoryActionKey,
engine.DeleteRandomSnapshotActionKey,
}
require.Contains(t, eligibleActionsList, action)

Expand Down

0 comments on commit b0814ee

Please sign in to comment.