@@ -133,7 +133,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
133
133
Name string
134
134
// Agents are mapped to a resource
135
135
Agents map [string ][]string
136
- UrlParam string
136
+ URLParam string
137
137
WorkspaceName string
138
138
ExpectedAgent string
139
139
ExpectedStatusCode int
@@ -143,7 +143,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
143
143
Name : "NoAgents" ,
144
144
WorkspaceName : "dev" ,
145
145
Agents : map [string ][]string {},
146
- UrlParam : "dev" ,
146
+ URLParam : "dev" ,
147
147
ExpectedError : "No agents exist" ,
148
148
ExpectedStatusCode : http .StatusBadRequest ,
149
149
},
@@ -156,7 +156,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
156
156
"agent-two" ,
157
157
},
158
158
},
159
- UrlParam : "dev" ,
159
+ URLParam : "dev" ,
160
160
ExpectedStatusCode : http .StatusBadRequest ,
161
161
ExpectedError : "More than one agent exists, but no agent specified" ,
162
162
},
@@ -171,7 +171,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
171
171
"agent-two" ,
172
172
},
173
173
},
174
- UrlParam : "dev" ,
174
+ URLParam : "dev" ,
175
175
ExpectedStatusCode : http .StatusBadRequest ,
176
176
ExpectedError : "More than one agent exists, but no agent specified" ,
177
177
},
@@ -183,7 +183,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
183
183
"agent-one" ,
184
184
},
185
185
},
186
- UrlParam : "dev.not-exists" ,
186
+ URLParam : "dev.not-exists" ,
187
187
ExpectedStatusCode : http .StatusBadRequest ,
188
188
ExpectedError : "No agent exists with the name" ,
189
189
},
@@ -201,7 +201,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
201
201
"agent-three" ,
202
202
},
203
203
},
204
- UrlParam : "dev.not-exists" ,
204
+ URLParam : "dev.not-exists" ,
205
205
ExpectedStatusCode : http .StatusBadRequest ,
206
206
ExpectedError : "No agent exists with the name" ,
207
207
},
@@ -216,7 +216,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
216
216
"agent-one" ,
217
217
},
218
218
},
219
- UrlParam : "dev" ,
219
+ URLParam : "dev" ,
220
220
ExpectedAgent : "agent-one" ,
221
221
ExpectedStatusCode : http .StatusOK ,
222
222
},
@@ -228,7 +228,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
228
228
"agent-one" ,
229
229
},
230
230
},
231
- UrlParam : "dev" ,
231
+ URLParam : "dev" ,
232
232
ExpectedAgent : "agent-one" ,
233
233
ExpectedStatusCode : http .StatusOK ,
234
234
},
@@ -242,7 +242,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
242
242
"agent-selected" ,
243
243
},
244
244
},
245
- UrlParam : "dev.agent-selected" ,
245
+ URLParam : "dev.agent-selected" ,
246
246
ExpectedAgent : "agent-selected" ,
247
247
ExpectedStatusCode : http .StatusOK ,
248
248
},
@@ -261,7 +261,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
261
261
"agent-three" ,
262
262
},
263
263
},
264
- UrlParam : "dev.agent-selected" ,
264
+ URLParam : "dev.agent-selected" ,
265
265
ExpectedAgent : "agent-selected" ,
266
266
ExpectedStatusCode : http .StatusOK ,
267
267
},
@@ -270,12 +270,13 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
270
270
for _ , c := range testCases {
271
271
c := c
272
272
t .Run (c .Name , func (t * testing.T ) {
273
+ t .Parallel ()
273
274
db , r := setupWorkspaceWithAgents (t , setupConfig {
274
275
WorkspaceName : c .WorkspaceName ,
275
276
Agents : c .Agents ,
276
277
})
277
278
278
- chi .RouteContext (r .Context ()).URLParams .Add ("workspacename_and_agent" , c .UrlParam )
279
+ chi .RouteContext (r .Context ()).URLParams .Add ("workspacename_and_agent" , c .URLParam )
279
280
280
281
rtr := chi .NewRouter ()
281
282
rtr .Use (
0 commit comments