feat: convert entire CLI to clibase (#6491)

I'm sorry.
This commit is contained in:
Ammar Bandukwala
2023-03-23 17:42:20 -05:00
committed by GitHub
parent b71b8daa21
commit 2bd6d2908e
345 changed files with 9965 additions and 9082 deletions

View File

@ -179,8 +179,7 @@ func TestWorkspaceAgentStartupLogs(t *testing.T) {
t.Parallel()
t.Run("Success", func(t *testing.T) {
t.Parallel()
ctx, cancelFunc := testutil.Context(t)
defer cancelFunc()
ctx := testutil.Context(t, testutil.WaitMedium)
client := coderdtest.New(t, &coderdtest.Options{
IncludeProvisionerDaemon: true,
})
@ -234,12 +233,10 @@ func TestWorkspaceAgentStartupLogs(t *testing.T) {
require.NoError(t, ctx.Err())
require.Len(t, logChunk, 1)
require.Equal(t, "testing", logChunk[0].Output)
cancelFunc()
})
t.Run("PublishesOnOverflow", func(t *testing.T) {
t.Parallel()
ctx, cancelFunc := testutil.Context(t)
defer cancelFunc()
ctx := testutil.Context(t, testutil.WaitMedium)
client := coderdtest.New(t, &coderdtest.Options{
IncludeProvisionerDaemon: true,
})
@ -293,7 +290,6 @@ func TestWorkspaceAgentStartupLogs(t *testing.T) {
}
// Ensure that the UI gets an update when the logs overflow!
require.True(t, update.LatestBuild.Resources[0].Agents[0].StartupLogsOverflowed)
cancelFunc()
})
}
@ -985,8 +981,7 @@ func TestWorkspaceAgentsGitAuth(t *testing.T) {
})
t.Run("ValidateURL", func(t *testing.T) {
t.Parallel()
ctx, cancelFunc := testutil.Context(t)
defer cancelFunc()
ctx := testutil.Context(t, testutil.WaitLong)
srv := httptest.NewServer(nil)
defer srv.Close()
@ -1239,7 +1234,7 @@ func TestWorkspaceAgent_LifecycleState(t *testing.T) {
for _, tt := range tests {
tt := tt
t.Run(string(tt.state), func(t *testing.T) {
ctx, _ := testutil.Context(t)
ctx := testutil.Context(t, testutil.WaitLong)
err := agentClient.PostLifecycle(ctx, agentsdk.PostLifecycleRequest{
State: tt.state,