Skip to content

Commit

Permalink
Merge pull request #14560 from serathius/env
Browse files Browse the repository at this point in the history
tests: Pass only etcd related environment variables during e2e tests
  • Loading branch information
serathius authored Nov 4, 2022
2 parents 0dfd726 + 81bd3fb commit e614eec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/framework/e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ func mergeEnvVariables(envVars map[string]string) []string {
currVars := os.Environ()
for _, v := range currVars {
p := strings.Split(v, "=")
// TODO: Remove PATH when we stop using system binaries (`awk`, `echo`)
if !strings.HasPrefix(p[0], "ETCD_") && !strings.HasPrefix(p[0], "ETCDCTL_") && !strings.HasPrefix(p[0], "EXPECT_") && p[0] != "PATH" {
continue
}
if _, ok := envVars[p[0]]; !ok {
env = append(env, fmt.Sprintf("%s=%s", p[0], p[1]))
}
Expand Down

0 comments on commit e614eec

Please sign in to comment.