Skip to content

Commit b5e661d

Browse files
committed
run silence_storage_warning only GHA
1 parent 22f220e commit b5e661d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/e2e/e2e_helper.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"os"
66
"os/exec"
7+
"strconv"
78
"testing"
89

910
"github.com/spf13/afero"
@@ -15,7 +16,10 @@ func RunTF(args ...string) (string, error) {
1516
ctx := context.Background()
1617

1718
// Ensure Atlas CLI storage warning is silenced before running tests as it is not enabled in GitHub Actions
18-
_ = exec.CommandContext(ctx, "atlas", "config", "set", "silence_storage_warning", "true").Run()
19+
inCI, _ := strconv.ParseBool(os.Getenv("CI"))
20+
if inCI {
21+
_ = exec.CommandContext(ctx, "atlas", "config", "set", "silence_storage_warning", "true").Run()
22+
}
1923

2024
args = append([]string{"tf"}, args...)
2125
cmd := exec.CommandContext(ctx, "atlas", args...)

0 commit comments

Comments
 (0)