File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,29 @@ func TestAgent(t *testing.T) {
272
272
},
273
273
wantErr : true ,
274
274
},
275
+ {
276
+ name : "Shows agent troubleshooting URL" ,
277
+ opts : cliui.AgentOptions {
278
+ FetchInterval : time .Millisecond ,
279
+ Wait : true ,
280
+ },
281
+ iter : []func (context.Context , * codersdk.WorkspaceAgent , chan []codersdk.WorkspaceAgentStartupLog ) error {
282
+ func (_ context.Context , agent * codersdk.WorkspaceAgent , _ chan []codersdk.WorkspaceAgentStartupLog ) error {
283
+ agent .Status = codersdk .WorkspaceAgentTimeout
284
+ agent .TroubleshootingURL = "https://troubleshoot"
285
+ return nil
286
+ },
287
+ func (_ context.Context , agent * codersdk.WorkspaceAgent , _ chan []codersdk.WorkspaceAgentStartupLog ) error {
288
+ return xerrors .New ("bad" )
289
+ },
290
+ },
291
+ want : []string {
292
+ "⧗ Waiting for initial connection from the workspace agent" ,
293
+ "The workspace agent is having trouble connecting, we will keep trying to reach it" ,
294
+ "https://troubleshoot" ,
295
+ },
296
+ wantErr : true ,
297
+ },
275
298
} {
276
299
tc := tc
277
300
t .Run (tc .name , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments