This test just validates that the CLI command accepts its known arguments.
(t *testing.T)
| 101 | |
| 102 | // This test just validates that the CLI command accepts its known arguments. |
| 103 | func TestScaleTestWorkspaceTraffic_Template(t *testing.T) { |
| 104 | t.Parallel() |
| 105 | |
| 106 | if testutil.RaceEnabled() { |
| 107 | t.Skip("Skipping due to race detector") |
| 108 | } |
| 109 | |
| 110 | ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium) |
| 111 | defer cancelFunc() |
| 112 | |
| 113 | log := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true}) |
| 114 | client := coderdtest.New(t, &coderdtest.Options{ |
| 115 | Logger: &log, |
| 116 | }) |
| 117 | _ = coderdtest.CreateFirstUser(t, client) |
| 118 | |
| 119 | inv, root := clitest.New(t, "exp", "scaletest", "workspace-traffic", |
| 120 | "--template", "doesnotexist", |
| 121 | ) |
| 122 | clitest.SetupConfig(t, client, root) |
| 123 | pty := ptytest.New(t) |
| 124 | inv.Stdout = pty.Output() |
| 125 | inv.Stderr = pty.Output() |
| 126 | |
| 127 | err := inv.WithContext(ctx).Run() |
| 128 | require.ErrorContains(t, err, "could not find template \"doesnotexist\" in any organization") |
| 129 | } |
| 130 | |
| 131 | // This test just validates that the CLI command accepts its known arguments. |
| 132 | func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) { |
nothing calls this directly
no test coverage detected