mirror of
https://github.com/kopia/kopia.git
synced 2026-05-19 20:24:46 -04:00
test(general): run maintenance action in robustness (#3927)
Adds the maintenance action to multi-client robustness jobs. The robustness jobs do not run a maintenance action until now. --------- Co-authored-by: Julio López <1953782+julio-lopez@users.noreply.github.com>
This commit is contained in:
@@ -190,6 +190,21 @@ func TestRandomizedSmall(t *testing.T) {
|
||||
th.RunN(ctx, t, numClients, f)
|
||||
}
|
||||
|
||||
func TestMaintenanceAction(t *testing.T) {
|
||||
t.Log("running maintenance directly on the repository under test")
|
||||
|
||||
// bypass the server to directly run maintenance on the repository
|
||||
// under test.
|
||||
// It launches a kopia process that directly accesses the repository
|
||||
// under test using the repo configuration for the server. The
|
||||
// server is concurrently running, since the framework starts
|
||||
// the server at the beginning of an execution of the framework.
|
||||
ctx := testlogging.ContextWithLevel(t, testlogging.LevelInfo)
|
||||
_, err := eng.ExecAction(ctx, engine.GCActionKey, nil)
|
||||
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// tryRestoreIntoDataDirectory runs eng.ExecAction on the given parameters and masks no-op errors.
|
||||
func tryRestoreIntoDataDirectory(ctx context.Context, t *testing.T) error { //nolint:thelper
|
||||
_, err := eng.ExecAction(ctx, engine.RestoreIntoDataDirectoryActionKey, nil)
|
||||
|
||||
Reference in New Issue
Block a user