Skip to content

Commit 52fd8e0

Browse files
authored
Merge pull request #1406 from fuweid/cherrypick_issue_1397
bugfix: use busybox:1.25 instead of busybox:1.28 in cli_tag_test
2 parents 15ab49d + aa62efe commit 52fd8e0

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

test/cli_tag_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ func init() {
2121
func (suite *PouchTagSuite) SetUpTest(c *check.C) {
2222
SkipIfFalse(c, environment.IsLinux)
2323

24-
PullImage(c, busyboxImage)
24+
PullImage(c, busyboxImage125)
2525
}
2626

2727
// TestImageTagOKWithSourceImageName tests OK.
2828
func (suite *PouchTagSuite) TestImageTagOKWithSourceImageName(c *check.C) {
2929
repo, tag := "localhost:5000/testimagetagok/pouch", "source.name"
3030
tagRef := fmt.Sprintf("%s:%s", repo, tag)
31-
command.PouchRun("tag", busyboxImage, tagRef).Assert(c, icmd.Success)
31+
command.PouchRun("tag", busyboxImage125, tagRef).Assert(c, icmd.Success)
3232
defer forceDeleteImage(c, tagRef)
3333

3434
command.PouchRun("image", "inspect", tagRef).Assert(c, icmd.Success)
@@ -39,7 +39,7 @@ func (suite *PouchTagSuite) TestImageTagOKWithSourceImageID(c *check.C) {
3939
repo, tag := "localhost:5000/testimagetagok/pouch", "source.id"
4040
tagRef := fmt.Sprintf("%s:%s", repo, tag)
4141

42-
command.PouchRun("tag", environment.BusyboxID, tagRef).Assert(c, icmd.Success)
42+
command.PouchRun("tag", busyboxImage125ID, tagRef).Assert(c, icmd.Success)
4343
defer forceDeleteImage(c, tagRef)
4444

4545
command.PouchRun("image", "inspect", tagRef).Assert(c, icmd.Success)
@@ -50,7 +50,7 @@ func (suite *PouchTagSuite) TestImageTagOKTargetWithoutTag(c *check.C) {
5050
repo, tag := "localhost:5000/testimagetagok/pouch", "latest"
5151
tagRef := fmt.Sprintf("%s:%s", repo, tag)
5252

53-
command.PouchRun("tag", busyboxImage, repo).Assert(c, icmd.Success)
53+
command.PouchRun("tag", busyboxImage125, repo).Assert(c, icmd.Success)
5454
defer forceDeleteImage(c, tagRef)
5555

5656
command.PouchRun("image", "inspect", tagRef).Assert(c, icmd.Success)
@@ -62,7 +62,7 @@ func (suite *PouchTagSuite) TestImageTagFailToUseDigest(c *check.C) {
6262
dig := "sha256:1ac48589692a53a9b8c2d1ceaa6b402665aa7fe667ba51ccc03002300856d8c7"
6363

6464
tagRef := fmt.Sprintf("%s:%s@%s", repo, tag, dig)
65-
got := command.PouchRun("tag", busyboxImage, tagRef).Stderr()
65+
got := command.PouchRun("tag", busyboxImage125, tagRef).Stderr()
6666
c.Assert(got, check.NotNil)
6767

6868
expectedErr := "refusing to create a tag with a digest reference"
@@ -76,7 +76,7 @@ func (suite *PouchTagSuite) TestImageTagFailToUseSha256AsName(c *check.C) {
7676
repo, tag := "localhost:5000/testimagetagfail/sha256", "1.25"
7777

7878
tagRef := fmt.Sprintf("%s:%s", repo, tag)
79-
got := command.PouchRun("tag", busyboxImage, tagRef).Stderr()
79+
got := command.PouchRun("tag", busyboxImage125, tagRef).Stderr()
8080
c.Assert(got, check.NotNil)
8181

8282
expectedErr := "refusing to create an reference using digest algorithm as name"

test/utils.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ var (
2222
)
2323

2424
const (
25-
busyboxImage125 = "registry.hub.docker.com/library/busybox:1.25"
26-
testHubAddress = "registry.hub.docker.com"
27-
testHubUser = "pouchcontainertest"
28-
testHubPasswd = "pouchcontainertest"
25+
busyboxImage125 = "registry.hub.docker.com/library/busybox:1.25"
26+
busyboxImage125ID = "sha256:e02e811dd08fd49e7f6032625495118e63f597eb150403d02e3238af1df240ba"
27+
testHubAddress = "registry.hub.docker.com"
28+
testHubUser = "pouchcontainertest"
29+
testHubPasswd = "pouchcontainertest"
2930

3031
testDaemonHTTPSAddr = "tcp://0.0.0.0:2000"
3132
serverCa = "/tmp/tls/server/ca.pem"

0 commit comments

Comments
 (0)