fix(test): allow delete random snapshot action (#3987)

Addresses failure introduced in #3963

Change: allow `delete-random-snapID` action in the function `tryDeleteAction`.
Test: Manual local run was successful.
This commit is contained in:
chaitalisg
2024-07-16 13:25:24 -07:00
committed by GitHub
parent de298566ea
commit b0814ee3ff

View File

@@ -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)