mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move TestBuildFailsDockerfileEmpty to integration-cli
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
parent
d3023f25f5
commit
08a10f936b
2 changed files with 14 additions and 8 deletions
|
@ -1273,3 +1273,17 @@ func TestBuildFails(t *testing.T) {
|
|||
}
|
||||
logDone("build - fails")
|
||||
}
|
||||
|
||||
func TestBuildFailsDockerfileEmpty(t *testing.T) {
|
||||
name := "testbuildfails"
|
||||
defer deleteImages(name)
|
||||
_, err := buildImage(name, ``, true)
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "Dockerfile cannot be empty") {
|
||||
t.Fatalf("Wrong error %v, must be about empty Dockerfile", err)
|
||||
}
|
||||
} else {
|
||||
t.Fatal("Error must not be nil")
|
||||
}
|
||||
logDone("build - fails with empty dockerfile")
|
||||
}
|
||||
|
|
|
@ -413,14 +413,6 @@ func buildImage(context testContextTemplate, t *testing.T, eng *engine.Engine, u
|
|||
return image, err
|
||||
}
|
||||
|
||||
func TestBuildFailsDockerfileEmpty(t *testing.T) {
|
||||
_, err := buildImage(testContextTemplate{``, nil, nil}, t, nil, true)
|
||||
|
||||
if err != server.ErrDockerfileEmpty {
|
||||
t.Fatal("Expected: %v, got: %v", server.ErrDockerfileEmpty, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildOnBuildTrigger(t *testing.T) {
|
||||
_, err := buildImage(testContextTemplate{`
|
||||
from {IMAGE}
|
||||
|
|
Loading…
Add table
Reference in a new issue