mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Pass only etcd related environment variables during e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
2d638e0fd2
commit
81bd3fb9f9
@ -127,6 +127,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