diff --git a/cli/exp_rpty_test.go b/cli/exp_rpty_test.go index 2f0a24bf1cf41..782a7b5c08d48 100644 --- a/cli/exp_rpty_test.go +++ b/cli/exp_rpty_test.go @@ -87,6 +87,11 @@ func TestExpRpty(t *testing.T) { require.NoError(t, err, "Could not stop container") }) + _ = agenttest.New(t, client.URL, agentToken, func(o *agent.Options) { + o.ExperimentalContainersEnabled = true + }) + _ = coderdtest.NewWorkspaceAgentWaiter(t, client, workspace.ID).Wait() + inv, root := clitest.New(t, "exp", "rpty", workspace.Name, "-c", ct.Container.ID) clitest.SetupConfig(t, client, root) pty := ptytest.New(t).Attach(inv) @@ -96,11 +101,6 @@ func TestExpRpty(t *testing.T) { assert.NoError(t, err) }) - _ = agenttest.New(t, client.URL, agentToken, func(o *agent.Options) { - o.ExperimentalContainersEnabled = true - }) - _ = coderdtest.NewWorkspaceAgentWaiter(t, client, workspace.ID).Wait() - pty.ExpectMatch(fmt.Sprintf("Connected to %s", workspace.Name)) pty.ExpectMatch("Reconnect ID: ") pty.ExpectMatch(" #")