mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 13:41:36 +00:00
integ-cli: also preserve SystemRoot env var
Windows CI fails to dial remote test host over tcp in the test cases where we clear environment variables during `exec(dockerBinary, ...)` in the absence of `SystemRoot` environment variable (typically points to `c:\windows`). This fixes tests: - `TestRunEnvironmentErase` - `TestRunEnvironmentOverride` Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
@@ -869,7 +869,7 @@ func TestRunEnvironmentErase(t *testing.T) {
|
||||
defer deleteAllContainers()
|
||||
|
||||
cmd := exec.Command(dockerBinary, "run", "-e", "FOO", "-e", "HOSTNAME", "busybox", "env")
|
||||
cmd.Env = appendDockerHostEnv([]string{})
|
||||
cmd.Env = appendBaseEnv([]string{})
|
||||
|
||||
out, _, err := runCommandWithOutput(cmd)
|
||||
if err != nil {
|
||||
@@ -908,7 +908,7 @@ func TestRunEnvironmentOverride(t *testing.T) {
|
||||
defer deleteAllContainers()
|
||||
|
||||
cmd := exec.Command(dockerBinary, "run", "-e", "HOSTNAME", "-e", "HOME=/root2", "busybox", "env")
|
||||
cmd.Env = appendDockerHostEnv([]string{"HOSTNAME=bar"})
|
||||
cmd.Env = appendBaseEnv([]string{"HOSTNAME=bar"})
|
||||
|
||||
out, _, err := runCommandWithOutput(cmd)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user