This test just validates that the CLI command accepts its known arguments.
(t *testing.T)
| 130 | |
| 131 | // This test just validates that the CLI command accepts its known arguments. |
| 132 | func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) { |
| 133 | t.Parallel() |
| 134 | |
| 135 | if testutil.RaceEnabled() { |
| 136 | t.Skip("Skipping due to race detector") |
| 137 | } |
| 138 | |
| 139 | ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium) |
| 140 | defer cancelFunc() |
| 141 | |
| 142 | log := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}) |
| 143 | client := coderdtest.New(t, &coderdtest.Options{ |
| 144 | Logger: &log, |
| 145 | }) |
| 146 | _ = coderdtest.CreateFirstUser(t, client) |
| 147 | |
| 148 | inv, root := clitest.New(t, "exp", "scaletest", "workspace-traffic", |
| 149 | "--target-workspaces", "0:0", |
| 150 | ) |
| 151 | clitest.SetupConfig(t, client, root) |
| 152 | pty := ptytest.New(t) |
| 153 | inv.Stdout = pty.Output() |
| 154 | inv.Stderr = pty.Output() |
| 155 | |
| 156 | err := inv.WithContext(ctx).Run() |
| 157 | require.ErrorContains(t, err, "invalid target workspaces \"0:0\": start and end cannot be equal") |
| 158 | } |
| 159 | |
| 160 | // This test just validates that the CLI command accepts its known arguments. |
| 161 | func TestScaleTestCleanup_Template(t *testing.T) { |
nothing calls this directly
no test coverage detected