Skip to content

Commit

Permalink
fix(tests): Proper check to determine if env is IBM (#550)
Browse files Browse the repository at this point in the history
Fixes #549, as `buildinfo` contains the info about the test suite, not
the target env.
  • Loading branch information
jacalvo authored Aug 27, 2024
1 parent 3ad420d commit 844cffc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sysdig/resource_sysdig_secure_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package sysdig_test

import (
"fmt"
"os"
"strings"
"testing"

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

0 comments on commit 844cffc

Please sign in to comment.