|
@@ -973,14 +973,14 @@ func TestTty(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
func TestEnv(t *testing.T) {
|
|
|
+ os.Setenv("TRUE", "false")
|
|
|
runtime := mkRuntime(t)
|
|
|
defer nuke(runtime)
|
|
|
- container, _, err := runtime.Create(&Config{
|
|
|
- Image: GetTestImage(runtime).ID,
|
|
|
- Cmd: []string{"env"},
|
|
|
- },
|
|
|
- "",
|
|
|
- )
|
|
|
+ config, _, _, err := ParseRun([]string{"-e=FALSE=true", "-e=TRUE", GetTestImage(runtime).ID, "env"}, nil)
|
|
|
+ if err != nil {
|
|
|
+ t.Fatal(err)
|
|
|
+ }
|
|
|
+ container, _, err := runtime.Create(config, "")
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
|
}
|
|
@@ -1010,6 +1010,8 @@ func TestEnv(t *testing.T) {
|
|
|
"HOME=/",
|
|
|
"container=lxc",
|
|
|
"HOSTNAME=" + container.ShortID(),
|
|
|
+ "FALSE=true",
|
|
|
+ "TRUE=false",
|
|
|
}
|
|
|
sort.Strings(goodEnv)
|
|
|
if len(goodEnv) != len(actualEnv) {
|