test(cli/exptest): fix context in TestScaleTestWorkspaceTraffic_UseHostLogin (#16171)

This commit is contained in:
Mathias Fredriksson
2025-01-17 14:51:24 +02:00
committed by GitHub
parent cbe300448c
commit de874442f8

View File

@ -20,9 +20,6 @@ import (
// can influence other tests in the same package.
// nolint:paralleltest
func TestScaleTestWorkspaceTraffic_UseHostLogin(t *testing.T) {
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
defer cancelFunc()
log := slogtest.Make(t, &slogtest.Options{IgnoreErrors: true})
client := coderdtest.New(t, &coderdtest.Options{
Logger: &log,
@ -41,6 +38,9 @@ func TestScaleTestWorkspaceTraffic_UseHostLogin(t *testing.T) {
cwr.Name = "scaletest-workspace"
})
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
defer cancel()
// Test without --use-host-login first.g
inv, root := clitest.New(t, "exp", "scaletest", "workspace-traffic",
"--template", tpl.Name,