Skip to content

Commit

Permalink
test: ignore bearer env vars in e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
didroe committed Oct 12, 2023
1 parent 232e9db commit 65b0834
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions e2e/internal/testhelper/testhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 65b0834

Please sign in to comment.