(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func TestMaintenanceSetListParallelism(t *testing.T) { |
| 43 | t.Parallel() |
| 44 | |
| 45 | e := testenv.NewCLITest(t, testenv.RepoFormatNotImportant, testenv.NewInProcRunner(t)) |
| 46 | defer e.RunAndExpectSuccess(t, "repo", "disconnect") |
| 47 | |
| 48 | var mi cli.MaintenanceInfo |
| 49 | |
| 50 | e.RunAndExpectSuccess(t, "repo", "create", "filesystem", "--path", e.RepoDir) |
| 51 | |
| 52 | require.NotContains(t, e.RunAndExpectSuccess(t, "maintenance", "info"), "List parallelism: 0") |
| 53 | |
| 54 | e.RunAndExpectSuccess(t, "maintenance", "set", "--list-parallelism", "33") |
| 55 | require.Contains(t, e.RunAndExpectSuccess(t, "maintenance", "info"), "List parallelism: 33") |
| 56 | testutil.MustParseJSONLines(t, e.RunAndExpectSuccess(t, "maintenance", "info", "--json"), &mi) |
| 57 | require.Equal(t, 33, mi.ListParallelism, "List parallelism should be set to 33.") |
| 58 | |
| 59 | e.RunAndExpectSuccess(t, "maintenance", "set", "--list-parallelism", "0") |
| 60 | require.NotContains(t, e.RunAndExpectSuccess(t, "maintenance", "info"), "List parallelism: 0") |
| 61 | } |
| 62 | |
| 63 | func (s *formatSpecificTestSuite) TestInvalidExtendRetainOptions(t *testing.T) { |
| 64 | var mi cli.MaintenanceInfo |
nothing calls this directly
no test coverage detected