added tests for 1405

This commit is contained in:
Isao Jonas
2013-08-05 09:30:27 -05:00
parent 0f249c85ea
commit d00fb40967
2 changed files with 56 additions and 0 deletions
+22
View File
@@ -996,6 +996,28 @@ func TestEntrypoint(t *testing.T) {
}
}
func TestEntrypointNoCmd(t *testing.T) {
runtime := mkRuntime(t)
defer nuke(runtime)
container, err := NewBuilder(runtime).Create(
&Config{
Image: GetTestImage(runtime).ID,
Entrypoint: []string{"/bin/echo", "foobar"},
},
)
if err != nil {
t.Fatal(err)
}
defer runtime.Destroy(container)
output, err := container.Output()
if err != nil {
t.Fatal(err)
}
if strings.Trim(string(output), "\r\n") != "foobar" {
t.Error(string(output))
}
}
func grepFile(t *testing.T, path string, pattern string) {
f, err := os.Open(path)
if err != nil {