Skip to content

Commit 844cffc

Browse files
authored
fix(tests): Proper check to determine if env is IBM (#550)
Fixes #549, as `buildinfo` contains the info about the test suite, not the target env.
1 parent 3ad420d commit 844cffc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sysdig/resource_sysdig_secure_policy_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ package sysdig_test
44

55
import (
66
"fmt"
7+
"os"
8+
"strings"
79
"testing"
810

911
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
@@ -49,7 +51,7 @@ func TestAccPolicy(t *testing.T) {
4951
resource.TestStep{Config: policiesForGCPAuditLog(rText())},
5052
resource.TestStep{Config: policiesForAzurePlatformlogs(rText())},
5153
)
52-
if !buildinfo.IBMSecure {
54+
if !strings.HasSuffix(os.Getenv("SYSDIG_SECURE_URL"), "ibm.com") {
5355
steps = append(steps,
5456
resource.TestStep{Config: policiesForFalcoCloudAWSCloudtrail(rText())},
5557
resource.TestStep{Config: policiesForOkta(rText())},

0 commit comments

Comments
 (0)