test: put each arg in a separate string
Each arg to docker run should be placed in a separate string. Otherwise, when starting the command via exec.Cmd, the command is interpreted as "echo test", which can't be found.
This commit is contained in:
parent
457375ea37
commit
30ea0bebce
|
@ -109,7 +109,7 @@ func TestCreateRmVolumes(t *testing.T) {
|
||||||
srv := mkServerFromEngine(eng, t)
|
srv := mkServerFromEngine(eng, t)
|
||||||
defer mkRuntimeFromEngine(eng, t).Nuke()
|
defer mkRuntimeFromEngine(eng, t).Nuke()
|
||||||
|
|
||||||
config, hostConfig, _, err := docker.ParseRun([]string{"-v", "/srv", unitTestImageID, "echo test"}, nil)
|
config, hostConfig, _, err := docker.ParseRun([]string{"-v", "/srv", unitTestImageID, "echo", "test"}, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ func TestRmi(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
config, hostConfig, _, err := docker.ParseRun([]string{unitTestImageID, "echo test"}, nil)
|
config, hostConfig, _, err := docker.ParseRun([]string{unitTestImageID, "echo", "test"}, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue