Merge pull request #15826 from Microsoft/start-from-one

Builder counts from 1
This commit is contained in:
Alexander Morozov
2015-08-26 13:59:38 -07:00
5 changed files with 30 additions and 13 deletions
+18 -1
View File
@@ -5316,7 +5316,24 @@ func (s *DockerSuite) TestBuildNoDupOutput(c *check.C) {
c.Fatalf("Build should have worked: %q", err)
}
exp := "\nStep 1 : RUN env\n"
exp := "\nStep 2 : RUN env\n"
if !strings.Contains(out, exp) {
c.Fatalf("Bad output\nGot:%s\n\nExpected to contain:%s\n", out, exp)
}
}
// GH15826
func (s *DockerSuite) TestBuildStartsFromOne(c *check.C) {
// Explicit check to ensure that build starts from step 1 rather than 0
name := "testbuildstartsfromone"
_, out, err := buildImageWithOut(name, `
FROM busybox`, false)
if err != nil {
c.Fatalf("Build should have worked: %q", err)
}
exp := "\nStep 1 : FROM busybox\n"
if !strings.Contains(out, exp) {
c.Fatalf("Bad output\nGot:%s\n\nExpected to contain:%s\n", out, exp)
}