@@ -252,31 +252,31 @@ func (s *DockerSchema1RegistrySuite) TestCrossRepositoryLayerPushNotSupported(c
252252 dockerCmd (c , "tag" , "busybox" , sourceRepoName )
253253 // push the image to the registry
254254 out1 , _ , err := dockerCmdWithError ("push" , sourceRepoName )
255- c . Assert ( err , check . IsNil , check . Commentf ("pushing the image to the private registry has failed: %s" , out1 ))
255+ assert . NilError ( c , err , fmt . Sprintf ("pushing the image to the private registry has failed: %s" , out1 ))
256256 // ensure that none of the layers were mounted from another repository during push
257- c .Assert (strings .Contains (out1 , "Mounted from" ), check . Equals , false )
257+ assert .Assert (c , ! strings .Contains (out1 , "Mounted from" ))
258258
259259 digest1 := reference .DigestRegexp .FindString (out1 )
260- c .Assert (len (digest1 ), checker . GreaterThan , 0 , check . Commentf ( "no digest found for pushed manifest" ) )
260+ assert .Assert (c , len (digest1 ) > 0 , "no digest found for pushed manifest" )
261261
262262 destRepoName := fmt .Sprintf ("%v/dockercli/crossrepopush" , privateRegistryURL )
263263 // retag the image to upload the same layers to another repo in the same registry
264264 dockerCmd (c , "tag" , "busybox" , destRepoName )
265265 // push the image to the registry
266266 out2 , _ , err := dockerCmdWithError ("push" , destRepoName )
267- c . Assert ( err , check . IsNil , check . Commentf ("pushing the image to the private registry has failed: %s" , out2 ))
267+ assert . NilError ( c , err , fmt . Sprintf ("pushing the image to the private registry has failed: %s" , out2 ))
268268 // schema1 registry should not support cross-repo layer mounts, so ensure that this does not happen
269- c .Assert (strings .Contains (out2 , "Mounted from" ), check . Equals , false )
269+ assert .Assert (c , ! strings .Contains (out2 , "Mounted from" ))
270270
271271 digest2 := reference .DigestRegexp .FindString (out2 )
272- c .Assert (len (digest2 ), checker . GreaterThan , 0 , check . Commentf ( "no digest found for pushed manifest" ) )
273- c .Assert (digest1 , check . Not ( check . Equals ), digest2 )
272+ assert .Assert (c , len (digest2 ) > 0 , "no digest found for pushed manifest" )
273+ assert .Assert (c , digest1 != digest2 )
274274
275275 // ensure that we can pull and run the second pushed repository
276276 dockerCmd (c , "rmi" , destRepoName )
277277 dockerCmd (c , "pull" , destRepoName )
278278 out3 , _ := dockerCmd (c , "run" , destRepoName , "echo" , "-n" , "hello world" )
279- c .Assert (out3 , check . Equals , "hello world" )
279+ assert .Assert (c , out3 == "hello world" )
280280}
281281
282282func (s * DockerRegistryAuthHtpasswdSuite ) TestPushNoCredentialsNoRetry (c * check.C ) {
0 commit comments