@@ -244,15 +244,15 @@ func TestAccSkytapEnvironment_UserDataUpdate(t *testing.T) {
244
244
})
245
245
}
246
246
247
- func labelRequirements (uniqueSuffix int ) string {
247
+ func labelRequirements (uniqueSuffix string ) string {
248
248
return fmt .Sprintf (`
249
249
resource skytap_label_category "environment_label" {
250
- name = "tftest-Environment-%d "
250
+ name = "tftest-Environment-%s "
251
251
single_value = true
252
252
}
253
253
254
254
resource skytap_label_category "owners_label" {
255
- name = "tftest-Owners-%d "
255
+ name = "tftest-Owners-%s "
256
256
single_value = false
257
257
}
258
258
` , uniqueSuffix , uniqueSuffix )
@@ -285,7 +285,7 @@ func TestAccSkytapEnvironment_Labels(t *testing.T) {
285
285
Steps : []resource.TestStep {
286
286
{
287
287
PreventDiskCleanup : true ,
288
- Config : testAccSkytapEnvironmentConfigBlock (uniqueSuffix , templateID , labelRequirements (uniqueSuffix ), labels ),
288
+ Config : testAccSkytapEnvironmentConfigBlock (uniqueSuffix , templateID , labelRequirements (t . Name () ), labels ),
289
289
Check : resource .ComposeTestCheckFunc (
290
290
testAccCheckSkytapEnvironmentExists ("skytap_environment.foo" , & environment ),
291
291
),
@@ -325,8 +325,8 @@ func TestAccSkytapEnvironment_LabelsUpdate(t *testing.T) {
325
325
}
326
326
`
327
327
328
- labelEnv := fmt .Sprintf ("tftest-Environment-%d " , uniqueSuffix )
329
- labelOwners := fmt .Sprintf ("tftest-Owners-%d " , uniqueSuffix )
328
+ labelEnv := fmt .Sprintf ("tftest-Environment-%s " , t . Name () )
329
+ labelOwners := fmt .Sprintf ("tftest-Owners-%s " , t . Name () )
330
330
331
331
resource .ParallelTest (t , resource.TestCase {
332
332
PreCheck : func () { testAccPreCheck (t ) },
@@ -335,7 +335,7 @@ func TestAccSkytapEnvironment_LabelsUpdate(t *testing.T) {
335
335
Steps : []resource.TestStep {
336
336
{
337
337
PreventDiskCleanup : true ,
338
- Config : testAccSkytapEnvironmentConfigBlock (uniqueSuffix , templateID , labelRequirements (uniqueSuffix ), labels ),
338
+ Config : testAccSkytapEnvironmentConfigBlock (uniqueSuffix , templateID , labelRequirements (t . Name () ), labels ),
339
339
Check : resource .ComposeTestCheckFunc (
340
340
testAccCheckSkytapEnvironmentExists ("skytap_environment.foo" , & environment ),
341
341
testAccCheckSkytapEnvironmentContainsLabel (& environment , labelEnv , "Prod" ),
@@ -345,7 +345,7 @@ func TestAccSkytapEnvironment_LabelsUpdate(t *testing.T) {
345
345
},
346
346
{
347
347
PreventDiskCleanup : true ,
348
- Config : testAccSkytapEnvironmentConfigBlock (uniqueSuffix , templateID , labelRequirements (uniqueSuffix ), labelsUpdated ),
348
+ Config : testAccSkytapEnvironmentConfigBlock (uniqueSuffix , templateID , labelRequirements (t . Name () ), labelsUpdated ),
349
349
Check : resource .ComposeTestCheckFunc (
350
350
testAccCheckSkytapEnvironmentExists ("skytap_environment.foo" , & environment ),
351
351
testAccCheckSkytapEnvironmentContainsLabel (& environment , labelEnv , "UAT" ),
0 commit comments