diff --git a/e2e/internal/testhelper/testhelper.go b/e2e/internal/testhelper/testhelper.go index 91c30a275..d49a363aa 100644 --- a/e2e/internal/testhelper/testhelper.go +++ b/e2e/internal/testhelper/testhelper.go @@ -97,10 +97,23 @@ func CreateCommand(arguments []string) (*exec.Cmd, context.CancelFunc) { } cmd.Dir = GetCWD() + cmd.Env = getEnvironment() return cmd, cancel } +func getEnvironment() []string { + var result []string + + for _, variable := range os.Environ() { + if !strings.HasPrefix(variable, "BEARER_") { + result = append(result, variable) + } + } + + return result +} + func executablePath() string { if value, ok := os.LookupEnv("BEARER_EXECUTABLE_PATH"); ok { return value