1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

Clean more build utils in integration cli

- Remove deprecated buildImage* functions
- Rename buildImageNew to buildImage
- Use *check.C in fakeContext* setup and in getIdByName

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2017-01-16 11:30:14 +01:00
parent 8c7651998f
commit c10f6ef43f
28 changed files with 587 additions and 1194 deletions

View File

@ -379,11 +379,9 @@ func (s *DockerSuite) TestEventsFilterImageLabels(c *check.C) {
label := "io.docker.testing=image"
// Build a test image.
_, err := buildImage(name, fmt.Sprintf(`
buildImageSuccessfully(c, name, withDockerfile(fmt.Sprintf(`
FROM busybox:latest
LABEL %s`, label), true)
c.Assert(err, checker.IsNil, check.Commentf("Couldn't create image"))
LABEL %s`, label)))
dockerCmd(c, "tag", name, "labelfiltertest:tag1")
dockerCmd(c, "tag", name, "labelfiltertest:tag2")
dockerCmd(c, "tag", "busybox:latest", "labelfiltertest:tag3")
@ -462,10 +460,10 @@ func (s *DockerSuite) TestEventsCommit(c *check.C) {
func (s *DockerSuite) TestEventsCopy(c *check.C) {
// Build a test image.
id, err := buildImage("cpimg", `
buildImageSuccessfully(c, "cpimg", withDockerfile(`
FROM busybox
RUN echo HI > /file`, true)
c.Assert(err, checker.IsNil, check.Commentf("Couldn't create image"))
RUN echo HI > /file`))
id := getIDByName(c, "cpimg")
// Create an empty test file.
tempFile, err := ioutil.TempFile("", "test-events-copy-")
@ -595,11 +593,9 @@ func (s *DockerSuite) TestEventsFilterType(c *check.C) {
label := "io.docker.testing=image"
// Build a test image.
_, err := buildImage(name, fmt.Sprintf(`
buildImageSuccessfully(c, name, withDockerfile(fmt.Sprintf(`
FROM busybox:latest
LABEL %s`, label), true)
c.Assert(err, checker.IsNil, check.Commentf("Couldn't create image"))
LABEL %s`, label)))
dockerCmd(c, "tag", name, "labelfiltertest:tag1")
dockerCmd(c, "tag", name, "labelfiltertest:tag2")
dockerCmd(c, "tag", "busybox:latest", "labelfiltertest:tag3")