@@ -265,6 +265,10 @@ func TestWorkspaceBuildWithTags(t *testing.T) {
265
265
Key : "project_tag" ,
266
266
Value : `"${data.coder_parameter.project.value}+12345"` ,
267
267
},
268
+ {
269
+ Key : "team_tag" ,
270
+ Value : `"data.coder_parameter.team.value` ,
271
+ },
268
272
{
269
273
Key : "is_debug_build" ,
270
274
Value : `data.coder_parameter.is_debug_build.value == "true" ? "in-debug-mode" : "no-debug"` ,
@@ -273,12 +277,14 @@ func TestWorkspaceBuildWithTags(t *testing.T) {
273
277
274
278
richParameters := []database.TemplateVersionParameter {
275
279
// Parameters can be mutable although it is discouraged as the workspace can be moved between provisioner nodes.
276
- {Name : "project" , Description : "This is second parameter" , Mutable : true , Options : json .RawMessage ("[]" )},
280
+ {Name : "project" , Description : "This is first parameter" , Mutable : true , Options : json .RawMessage ("[]" )},
281
+ {Name : "team" , Description : "This is second parameter" , Mutable : true , DefaultValue : "godzilla" , Options : json .RawMessage ("[]" )},
277
282
{Name : "is_debug_build" , Type : "bool" , Description : "This is third parameter" , Mutable : false , Options : json .RawMessage ("[]" )},
278
283
}
279
284
280
285
buildParameters := []codersdk.WorkspaceBuildParameter {
281
286
{Name : "project" , Value : "foobar-foobaz" },
287
+ // "team" parameter is skipped, so default value is selected
282
288
{Name : "is_debug_build" , Value : "true" },
283
289
}
284
290
0 commit comments