Skip to content

Commit b4ee6d6

Browse files
fuweidallencloud
authored andcommitted
test: pull image before using it
Signed-off-by: Wei Fu <[email protected]>
1 parent 9df3f72 commit b4ee6d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/api_image_list_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ func (suite *APIImageListSuite) TestImageListDigest(c *check.C) {
5959

6060
// TestImageListFilter tests listing images with filter.
6161
func (suite *APIImageListSuite) TestImageListFilter(c *check.C) {
62-
q := url.Values{}
62+
PullImage(c, busyboxImage)
6363

64-
repoTag := environment.BusyboxRepo + ":" + environment.BusyboxTag
64+
q := url.Values{}
6565

6666
f := filters.NewArgs()
67-
f.Add("reference", repoTag)
67+
f.Add("reference", busyboxImage)
6868
filterJSON, err := filters.ToParam(f)
6969
c.Assert(err, check.IsNil)
7070

@@ -86,7 +86,7 @@ func (suite *APIImageListSuite) TestImageListFilter(c *check.C) {
8686
c.Assert(got[0].Architecture, check.NotNil)
8787
c.Assert(got[0].Size, check.NotNil)
8888
c.Assert(got[0].Os, check.NotNil)
89-
c.Assert(reflect.DeepEqual(got[0].RepoTags, []string{repoTag}), check.Equals, true)
89+
c.Assert(reflect.DeepEqual(got[0].RepoTags, []string{busyboxImage}), check.Equals, true)
9090
}
9191

9292
// TestImageListInvalidFilter tests listing images with invalid filter.

0 commit comments

Comments
 (0)