diff --git a/.secrets.baseline b/.secrets.baseline index f817daf3..203a7575 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "go.sum|package-lock.json|^.secrets.baseline$", "lines": null }, - "generated_at": "2025-01-15T21:34:03Z", + "generated_at": "2025-01-24T15:40:02Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -216,7 +216,7 @@ "hashed_secret": "b4e929aa58c928e3e44d12e6f873f39cd8207a25", "is_secret": false, "is_verified": false, - "line_number": 481, + "line_number": 487, "type": "Secret Keyword", "verified_result": null }, @@ -224,7 +224,7 @@ "hashed_secret": "16282376ddaaaf2bf60be9041a7504280f3f338b", "is_secret": false, "is_verified": false, - "line_number": 494, + "line_number": 500, "type": "Secret Keyword", "verified_result": null } diff --git a/testhelper/test_options.go b/testhelper/test_options.go index f0e808d4..5d799047 100644 --- a/testhelper/test_options.go +++ b/testhelper/test_options.go @@ -31,6 +31,8 @@ type TestOptions struct { // See examples in cloudinfo/testdata for proper format. BestRegionYAMLPath string + ApiDataIsSensitive *bool + // Used with dynamic region selection, if any errors occur this will be the region used (fail-open) DefaultRegion string diff --git a/testhelper/tests.go b/testhelper/tests.go index 8b57a31b..ea26aa02 100644 --- a/testhelper/tests.go +++ b/testhelper/tests.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "path" + "strconv" "strings" "testing" "time" @@ -39,7 +40,12 @@ func (options *TestOptions) TestSetup() { // testSetup Setup test func (options *TestOptions) testSetup() { if !options.SkipTestSetup { - os.Setenv("API_DATA_IS_SENSITIVE", "true") + + if options.ApiDataIsSensitive == nil { + os.Setenv("API_DATA_IS_SENSITIVE", "true") + } else { + os.Setenv("API_DATA_IS_SENSITIVE", strconv.FormatBool(*options.ApiDataIsSensitive)) + } // If calling test had not provided its own TerraformOptions, use the default settings if options.TerraformOptions == nil { // Construct the terraform options with default retryable errors to handle the most common