INNER CODE UNIT · Go
TestBuildDockerfileNotInContextRoot
genuinetools/img · build_test.go:94
func TestBuildDockerfileNotInContextRoot(t *testing.T) {
name := "testbuilddockerfilenotincontextroot"
run(t, "build", "-t", name, "-f", "testdata/Dockerfile.test-build-dockerfile-not-in-context", ".")
}
// Make sure the client exits with the correct exit code.
// https://github.com/genuinetools/img/issues/101
func TestBuildDockerfileFailing(t *testing.T) {
name := "testbuilddockerfilefailing"
args := []string{"build", "-t", name, "-f", "testdata/Dockerfile.test-build-failing", "."}
out, err := doRun(args, nil)
if err == nil {
t.Logf("img %v should have failed but did not: %s", args, out)
t.FailNow()
}
}