mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
@ -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,
|
||||
|
Reference in New Issue
Block a user