This test just validates that the CLI command accepts its known arguments.
(t *testing.T)
| 159 | |
| 160 | // This test just validates that the CLI command accepts its known arguments. |
| 161 | func TestScaleTestCleanup_Template(t *testing.T) { |
| 162 | t.Parallel() |
| 163 | |
| 164 | if testutil.RaceEnabled() { |
| 165 | t.Skip("Skipping due to race detector") |
| 166 | } |
| 167 | |
| 168 | ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium) |
| 169 | defer cancelFunc() |
| 170 | |
| 171 | log := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}) |
| 172 | client := coderdtest.New(t, &coderdtest.Options{ |
| 173 | Logger: &log, |
| 174 | }) |
| 175 | _ = coderdtest.CreateFirstUser(t, client) |
| 176 | |
| 177 | inv, root := clitest.New(t, "exp", "scaletest", "cleanup", |
| 178 | "--template", "doesnotexist", |
| 179 | ) |
| 180 | clitest.SetupConfig(t, client, root) |
| 181 | pty := ptytest.New(t) |
| 182 | inv.Stdout = pty.Output() |
| 183 | inv.Stderr = pty.Output() |
| 184 | |
| 185 | err := inv.WithContext(ctx).Run() |
| 186 | require.ErrorContains(t, err, "could not find template \"doesnotexist\" in any organization") |
| 187 | } |
| 188 | |
| 189 | // This test just validates that the CLI command accepts its known arguments. |
| 190 | func TestScaleTestDashboard(t *testing.T) { |
nothing calls this directly
no test coverage detected