Skip to content

Commit 41a19b5

Browse files
committed
Update off workspace generation
The second parameter should be blank to generate one without an agent (which simulates an off workspace here).
1 parent 7233210 commit 41a19b5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/test/groovy/CoderWorkspacesStepViewTest.groovy

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ class CoderWorkspacesStepViewTest extends Specification {
99
def table = new WorkspacesTable()
1010
table.listTableModel.items = List.of(
1111
// An off workspace.
12-
DataGen.workspaceAgentModel("ws1", "ws1"),
12+
DataGen.workspaceAgentModel("ws1"),
1313

1414
// On workspaces.
1515
DataGen.workspaceAgentModel("agent1", "ws2"),
1616
DataGen.workspaceAgentModel("agent2", "ws2"),
1717
DataGen.workspaceAgentModel("agent3", "ws3"),
1818

1919
// Another off workspace.
20-
DataGen.workspaceAgentModel("ws4", "ws4"),
20+
DataGen.workspaceAgentModel("ws4"),
2121

2222
// In practice we do not list both agents and workspaces
2323
// together but here test that anyway with an agent first and
2424
// then with a workspace first.
2525
DataGen.workspaceAgentModel("agent2", "ws5"),
26-
DataGen.workspaceAgentModel("ws5", "ws5"),
27-
DataGen.workspaceAgentModel("ws6", "ws6"),
26+
DataGen.workspaceAgentModel("ws5"),
27+
DataGen.workspaceAgentModel("ws6"),
2828
DataGen.workspaceAgentModel("agent3", "ws6"),
2929
)
3030

@@ -35,19 +35,19 @@ class CoderWorkspacesStepViewTest extends Specification {
3535
selected | expected
3636
null | -1 // No selection.
3737
DataGen.workspaceAgentModel("gone", "gone") | -1 // No workspace that matches.
38-
DataGen.workspaceAgentModel("ws1", "ws1") | 0 // Workspace exact match.
38+
DataGen.workspaceAgentModel("ws1") | 0 // Workspace exact match.
3939
DataGen.workspaceAgentModel("gone", "ws1") | 0 // Agent gone, select workspace.
40-
DataGen.workspaceAgentModel("ws2", "ws2") | 1 // Workspace gone, select first agent.
40+
DataGen.workspaceAgentModel("ws2") | 1 // Workspace gone, select first agent.
4141
DataGen.workspaceAgentModel("agent1", "ws2") | 1 // Agent exact match.
4242
DataGen.workspaceAgentModel("agent2", "ws2") | 2 // Agent exact match.
43-
DataGen.workspaceAgentModel("ws3", "ws3") | 3 // Workspace gone, select first agent.
43+
DataGen.workspaceAgentModel("ws3") | 3 // Workspace gone, select first agent.
4444
DataGen.workspaceAgentModel("agent3", "ws3") | 3 // Agent exact match.
4545
DataGen.workspaceAgentModel("gone", "ws4") | 4 // Agent gone, select workspace.
46-
DataGen.workspaceAgentModel("ws4", "ws4") | 4 // Workspace exact match.
46+
DataGen.workspaceAgentModel("ws4") | 4 // Workspace exact match.
4747
DataGen.workspaceAgentModel("agent2", "ws5") | 5 // Agent exact match.
4848
DataGen.workspaceAgentModel("gone", "ws5") | 5 // Agent gone, another agent comes first.
49-
DataGen.workspaceAgentModel("ws5", "ws5") | 6 // Workspace exact match.
50-
DataGen.workspaceAgentModel("ws6", "ws6") | 7 // Workspace exact match.
49+
DataGen.workspaceAgentModel("ws5") | 6 // Workspace exact match.
50+
DataGen.workspaceAgentModel("ws6") | 7 // Workspace exact match.
5151
DataGen.workspaceAgentModel("gone", "ws6") | 7 // Agent gone, workspace comes first.
5252
DataGen.workspaceAgentModel("agent3", "ws6") | 8 // Agent exact match.
5353
}

0 commit comments

Comments
 (0)