Skip to content

Commit df48a0c

Browse files
committed
set readyat in timeout test for completeness
1 parent c85aa44 commit df48a0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/cliui/agent_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ func TestAgent(t *testing.T) {
9595
iter: []func(context.Context, *testing.T, *codersdk.WorkspaceAgent, <-chan string, chan []codersdk.WorkspaceAgentLog) error{
9696
func(_ context.Context, _ *testing.T, agent *codersdk.WorkspaceAgent, _ <-chan string, _ chan []codersdk.WorkspaceAgentLog) error {
9797
agent.Status = codersdk.WorkspaceAgentConnecting
98+
agent.LifecycleState = codersdk.WorkspaceAgentLifecycleStarting
99+
agent.StartedAt = ptr.Ref(time.Now())
98100
return nil
99101
},
100102
func(_ context.Context, t *testing.T, agent *codersdk.WorkspaceAgent, output <-chan string, _ chan []codersdk.WorkspaceAgentLog) error {
@@ -104,6 +106,7 @@ func TestAgent(t *testing.T) {
104106
agent.Status = codersdk.WorkspaceAgentConnected
105107
agent.LifecycleState = codersdk.WorkspaceAgentLifecycleStartTimeout
106108
agent.FirstConnectedAt = ptr.Ref(time.Now())
109+
agent.ReadyAt = ptr.Ref(time.Now())
107110
return nil
108111
},
109112
},

0 commit comments

Comments
 (0)