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:
Ahmet Alp Balkan
2015-03-07 01:09:01 -08:00
parent faa6fd40f4
commit d18689dff7
3 changed files with 20 additions and 9 deletions
+2 -2
View File
@@ -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 {