mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #14560 from serathius/env
tests: Pass only etcd related environment variables during e2e tests
This commit is contained in:
commit
e614eec948
@ -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]))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user