MCPcopy Index your code
hub / github.com/coder/coder / TestScaleTestCleanup_Template

Function TestScaleTestCleanup_Template

cli/exp_scaletest_test.go:161–187  ·  view source on GitHub ↗

This test just validates that the CLI command accepts its known arguments.

(t *testing.T)

Source from the content-addressed store, hash-verified

159
160// This test just validates that the CLI command accepts its known arguments.
161func 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.
190func TestScaleTestDashboard(t *testing.T) {

Callers

nothing calls this directly

Calls 10

RaceEnabledFunction · 0.92
NewFunction · 0.92
CreateFirstUserFunction · 0.92
NewFunction · 0.92
SetupConfigFunction · 0.92
NewFunction · 0.92
SkipMethod · 0.80
WithContextMethod · 0.80
OutputMethod · 0.65
RunMethod · 0.65

Tested by

no test coverage detected