@@ -404,6 +404,7 @@ func testAccCheckTFEPolicyAttributes(
404
404
return fmt .Errorf ("Bad name: %s" , policy .Name )
405
405
}
406
406
407
+ //nolint:staticcheck // this is still used by TFE versions older than 202306-1
407
408
if policy .Enforce [0 ].Mode != "hard-mandatory" {
408
409
return fmt .Errorf ("Bad enforce mode: %s" , policy .Enforce [0 ].Mode )
409
410
}
@@ -419,6 +420,7 @@ func testAccCheckTFEOPAPolicyAttributes(
419
420
return fmt .Errorf ("Bad name: %s" , policy .Name )
420
421
}
421
422
423
+ //nolint:staticcheck // this is still used by TFE versions older than 202306-1
422
424
if policy .Enforce [0 ].Mode != "mandatory" {
423
425
return fmt .Errorf ("Bad enforce mode: %s" , policy .Enforce [0 ].Mode )
424
426
}
@@ -438,10 +440,12 @@ func testAccCheckTFEDefaultPolicyAttributes(policy *tfe.Policy) resource.TestChe
438
440
}
439
441
440
442
switch policy .Kind {
443
+ //nolint:staticcheck // this is still used by TFE versions older than 202306-1
441
444
case tfe .Sentinel :
442
445
if policy .Enforce [0 ].Mode != "soft-mandatory" {
443
446
return fmt .Errorf ("Bad enforce mode: %s" , policy .Enforce [0 ].Mode )
444
447
}
448
+ //nolint:staticcheck // this is still used by TFE versions older than 202306-1
445
449
case tfe .OPA :
446
450
if policy .Enforce [0 ].Mode != "advisory" {
447
451
return fmt .Errorf ("Bad enforce mode: %s" , policy .Enforce [0 ].Mode )
@@ -458,6 +462,7 @@ func testAccCheckTFEPolicyAttributesUpdated(
458
462
return fmt .Errorf ("Bad name: %s" , policy .Name )
459
463
}
460
464
465
+ //nolint:staticcheck // this is still used by TFE versions older than 202306-1
461
466
if policy .Enforce [0 ].Mode != "soft-mandatory" {
462
467
return fmt .Errorf ("Bad enforce mode: %s" , policy .Enforce [0 ].Mode )
463
468
}
@@ -473,6 +478,7 @@ func testAccCheckTFEOPAPolicyAttributesUpdatedQuery(
473
478
return fmt .Errorf ("Bad name: %s" , policy .Name )
474
479
}
475
480
481
+ //nolint:staticcheck // this is still used by TFE versions older than 202306-1
476
482
if policy .Enforce [0 ].Mode != "mandatory" {
477
483
return fmt .Errorf ("Bad enforce mode: %s" , policy .Enforce [0 ].Mode )
478
484
}
@@ -492,6 +498,7 @@ func testAccCheckTFEOPAPolicyAttributesUpdatedAll(
492
498
return fmt .Errorf ("Bad name: %s" , policy .Name )
493
499
}
494
500
501
+ //nolint:staticcheck // this is still used by TFE versions older than 202306-1
495
502
if policy .Enforce [0 ].Mode != "advisory" {
496
503
return fmt .Errorf ("Bad enforce mode: %s" , policy .Enforce [0 ].Mode )
497
504
}
0 commit comments