Skip to content

Commit bd1a87f

Browse files
committed
test(site): Update agent mocks
1 parent aaf19bc commit bd1a87f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

site/src/testHelpers/entities.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ export const MockWorkspaceAgent: TypesGen.WorkspaceAgent = {
301301
},
302302
connection_timeout_seconds: 120,
303303
troubleshooting_url: "https://coder.com/troubleshoot",
304+
lifecycle_state: "starting",
304305
}
305306

306307
export const MockWorkspaceAgentDisconnected: TypesGen.WorkspaceAgent = {
@@ -310,6 +311,7 @@ export const MockWorkspaceAgentDisconnected: TypesGen.WorkspaceAgent = {
310311
status: "disconnected",
311312
version: "",
312313
latency: {},
314+
lifecycle_state: "ready",
313315
}
314316

315317
export const MockWorkspaceAgentOutdated: TypesGen.WorkspaceAgent = {
@@ -333,6 +335,7 @@ export const MockWorkspaceAgentOutdated: TypesGen.WorkspaceAgent = {
333335
latency_ms: 221.66,
334336
},
335337
},
338+
lifecycle_state: "ready",
336339
}
337340

338341
export const MockWorkspaceAgentConnecting: TypesGen.WorkspaceAgent = {
@@ -342,6 +345,7 @@ export const MockWorkspaceAgentConnecting: TypesGen.WorkspaceAgent = {
342345
status: "connecting",
343346
version: "",
344347
latency: {},
348+
lifecycle_state: "created",
345349
}
346350

347351
export const MockWorkspaceAgentTimeout: TypesGen.WorkspaceAgent = {
@@ -351,6 +355,28 @@ export const MockWorkspaceAgentTimeout: TypesGen.WorkspaceAgent = {
351355
status: "timeout",
352356
version: "",
353357
latency: {},
358+
lifecycle_state: "created",
359+
}
360+
361+
export const MockWorkspaceAgentStarting: TypesGen.WorkspaceAgent = {
362+
...MockWorkspaceAgent,
363+
id: "test-workspace-agent-starting",
364+
name: "a-starting-workspace-agent",
365+
lifecycle_state: "starting",
366+
}
367+
368+
export const MockWorkspaceAgentStartTimeout: TypesGen.WorkspaceAgent = {
369+
...MockWorkspaceAgent,
370+
id: "test-workspace-agent-start-timeout",
371+
name: "a-workspace-agent-timed-out-while-running-startup-script",
372+
lifecycle_state: "start_timeout",
373+
}
374+
375+
export const MockWorkspaceAgentStartError: TypesGen.WorkspaceAgent = {
376+
...MockWorkspaceAgent,
377+
id: "test-workspace-agent-start-error",
378+
name: "a-workspace-agent-errored-while-running-startup-script",
379+
lifecycle_state: "start_error",
354380
}
355381

356382
export const MockWorkspaceResource: TypesGen.WorkspaceResource = {

0 commit comments

Comments
 (0)