mirror of
https://github.com/kopia/kopia.git
synced 2026-05-19 12:14:45 -04:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user