Skip to content

Commit f44f5c0

Browse files
committed
Linting
1 parent 8b3f46d commit f44f5c0

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

coderd/httpmw/workspaceparam_test.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
133133
Name string
134134
// Agents are mapped to a resource
135135
Agents map[string][]string
136-
UrlParam string
136+
URLParam string
137137
WorkspaceName string
138138
ExpectedAgent string
139139
ExpectedStatusCode int
@@ -143,7 +143,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
143143
Name: "NoAgents",
144144
WorkspaceName: "dev",
145145
Agents: map[string][]string{},
146-
UrlParam: "dev",
146+
URLParam: "dev",
147147
ExpectedError: "No agents exist",
148148
ExpectedStatusCode: http.StatusBadRequest,
149149
},
@@ -156,7 +156,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
156156
"agent-two",
157157
},
158158
},
159-
UrlParam: "dev",
159+
URLParam: "dev",
160160
ExpectedStatusCode: http.StatusBadRequest,
161161
ExpectedError: "More than one agent exists, but no agent specified",
162162
},
@@ -171,7 +171,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
171171
"agent-two",
172172
},
173173
},
174-
UrlParam: "dev",
174+
URLParam: "dev",
175175
ExpectedStatusCode: http.StatusBadRequest,
176176
ExpectedError: "More than one agent exists, but no agent specified",
177177
},
@@ -183,7 +183,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
183183
"agent-one",
184184
},
185185
},
186-
UrlParam: "dev.not-exists",
186+
URLParam: "dev.not-exists",
187187
ExpectedStatusCode: http.StatusBadRequest,
188188
ExpectedError: "No agent exists with the name",
189189
},
@@ -201,7 +201,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
201201
"agent-three",
202202
},
203203
},
204-
UrlParam: "dev.not-exists",
204+
URLParam: "dev.not-exists",
205205
ExpectedStatusCode: http.StatusBadRequest,
206206
ExpectedError: "No agent exists with the name",
207207
},
@@ -216,7 +216,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
216216
"agent-one",
217217
},
218218
},
219-
UrlParam: "dev",
219+
URLParam: "dev",
220220
ExpectedAgent: "agent-one",
221221
ExpectedStatusCode: http.StatusOK,
222222
},
@@ -228,7 +228,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
228228
"agent-one",
229229
},
230230
},
231-
UrlParam: "dev",
231+
URLParam: "dev",
232232
ExpectedAgent: "agent-one",
233233
ExpectedStatusCode: http.StatusOK,
234234
},
@@ -242,7 +242,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
242242
"agent-selected",
243243
},
244244
},
245-
UrlParam: "dev.agent-selected",
245+
URLParam: "dev.agent-selected",
246246
ExpectedAgent: "agent-selected",
247247
ExpectedStatusCode: http.StatusOK,
248248
},
@@ -261,7 +261,7 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
261261
"agent-three",
262262
},
263263
},
264-
UrlParam: "dev.agent-selected",
264+
URLParam: "dev.agent-selected",
265265
ExpectedAgent: "agent-selected",
266266
ExpectedStatusCode: http.StatusOK,
267267
},
@@ -270,12 +270,13 @@ func TestWorkspaceAgentByNameParam(t *testing.T) {
270270
for _, c := range testCases {
271271
c := c
272272
t.Run(c.Name, func(t *testing.T) {
273+
t.Parallel()
273274
db, r := setupWorkspaceWithAgents(t, setupConfig{
274275
WorkspaceName: c.WorkspaceName,
275276
Agents: c.Agents,
276277
})
277278

278-
chi.RouteContext(r.Context()).URLParams.Add("workspacename_and_agent", c.UrlParam)
279+
chi.RouteContext(r.Context()).URLParams.Add("workspacename_and_agent", c.URLParam)
279280

280281
rtr := chi.NewRouter()
281282
rtr.Use(

0 commit comments

Comments
 (0)