@@ -21,19 +21,27 @@ func init() {
2121// SetUpTest does common setup in the beginning of each test.
2222func (suite * APIImageInspectSuite ) SetUpTest (c * check.C ) {
2323 SkipIfFalse (c , environment .IsLinux )
24- PullImage (c , busyboxImage )
24+ PullImage (c , fmt . Sprintf ( "%s:%s" , environment . BusyboxRepo , "1.24" ) )
2525}
2626
2727// TestImageInspectOk tests inspecting images is OK.
2828func (suite * APIImageInspectSuite ) TestImageInspectOk (c * check.C ) {
29- repoID := environment .BusyboxID
30- repoTag , repoDigest := busyboxImage , fmt .Sprintf ("%s@%s" , environment .BusyboxRepo , environment .BusyboxDigest )
29+ var (
30+ repo = environment .BusyboxRepo
31+ tag = "1.24"
32+
33+ id = "sha256:ca3d7d608b8a8bbaaac2c350bd0f9588cce0509ada74108d5c4b2afb24c46125"
34+ dig = "sha256:840f2b98a2540ff1d265782c42543dbec7218d3ab0e73b296d7dac846f146e27"
35+ )
36+
37+ repoTag := fmt .Sprintf ("%s:%s" , repo , tag )
38+ repoDigest := fmt .Sprintf ("%s@%s" , repo , dig )
3139
3240 for _ , image := range []string {
33- repoID ,
41+ id ,
3442 repoTag ,
3543 repoDigest ,
36- fmt .Sprintf ("%s:whatever@%s" , environment . BusyboxRepo , environment . BusyboxDigest ),
44+ fmt .Sprintf ("%s:whatever@%s" , repo , dig ),
3745 } {
3846 resp , err := request .Get ("/images/" + image + "/json" )
3947 c .Assert (err , check .IsNil )
@@ -45,7 +53,7 @@ func (suite *APIImageInspectSuite) TestImageInspectOk(c *check.C) {
4553
4654 // TODO: More specific check is needed
4755 c .Assert (got .Config , check .NotNil )
48- c .Assert (got .ID , check .Equals , repoID )
56+ c .Assert (got .ID , check .Equals , id )
4957 c .Assert (got .CreatedAt , check .NotNil )
5058 c .Assert (got .Size , check .NotNil )
5159 c .Assert (reflect .DeepEqual (got .RepoTags , []string {repoTag }), check .Equals , true )
0 commit comments