@@ -207,8 +207,7 @@ void pullWhenListenerIsNullThrowsException() {
207207 void pullPullsImageAndProducesEvents () throws Exception {
208208 ImageReference reference = ImageReference .of ("docker.io/paketobuildpacks/builder:base" );
209209 URI createUri = new URI (IMAGES_URL + "/create?fromImage=docker.io%2Fpaketobuildpacks%2Fbuilder%3Abase" );
210- URI imageUri = new URI (IMAGES_URL
211- + "/docker.io/paketobuildpacks/builder@sha256:4acb6bfd6c4f0cabaf7f3690e444afe51f1c7de54d51da7e63fac709c56f1c30/json" );
210+ URI imageUri = new URI (IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/json" );
212211 given (http ().post (eq (createUri ), isNull ())).willReturn (responseOf ("pull-stream.json" ));
213212 given (http ().get (imageUri )).willReturn (responseOf ("type/image.json" ));
214213 Image image = this .api .pull (reference , null , this .pullListener );
@@ -223,8 +222,7 @@ void pullPullsImageAndProducesEvents() throws Exception {
223222 void pullWithRegistryAuthPullsImageAndProducesEvents () throws Exception {
224223 ImageReference reference = ImageReference .of ("docker.io/paketobuildpacks/builder:base" );
225224 URI createUri = new URI (IMAGES_URL + "/create?fromImage=docker.io%2Fpaketobuildpacks%2Fbuilder%3Abase" );
226- URI imageUri = new URI (IMAGES_URL
227- + "/docker.io/paketobuildpacks/builder@sha256:4acb6bfd6c4f0cabaf7f3690e444afe51f1c7de54d51da7e63fac709c56f1c30/json" );
225+ URI imageUri = new URI (IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/json" );
228226 given (http ().post (eq (createUri ), eq ("auth token" ))).willReturn (responseOf ("pull-stream.json" ));
229227 given (http ().get (imageUri )).willReturn (responseOf ("type/image.json" ));
230228 Image image = this .api .pull (reference , null , this .pullListener , "auth token" );
@@ -242,7 +240,7 @@ void pullWithPlatformPullsImageAndProducesEvents() throws Exception {
242240 URI createUri = new URI (PLATFORM_IMAGES_URL
243241 + "/create?fromImage=gcr.io%2Fpaketo-buildpacks%2Fbuilder%3Abase&platform=linux%2Farm64%2Fv1" );
244242 URI imageUri = new URI (PLATFORM_IMAGES_URL
245- + "/gcr.io/paketo-buildpacks/builder@sha256:4acb6bfd6c4f0cabaf7f3690e444afe51f1c7de54d51da7e63fac709c56f1c30 /json" );
243+ + "/gcr.io/paketo-buildpacks/builder:base /json" );
246244 given (http ().head (eq (new URI (PING_URL ))))
247245 .willReturn (responseWithHeaders (new BasicHeader (DockerApi .API_VERSION_HEADER_NAME , "1.41" )));
248246 given (http ().post (eq (createUri ), isNull ())).willReturn (responseOf ("pull-stream.json" ));
@@ -450,38 +448,6 @@ void exportLayersWithSymlinksExportsLayerTars() throws Exception {
450448 .containsExactly ("/cnb/stack.toml" );
451449 }
452450
453- @ Test
454- void exportLayersWithPlatformExportsLayerTars () throws Exception {
455- ImageReference reference = ImageReference .of ("docker.io/paketobuildpacks/builder:base" );
456- ImagePlatform platform = ImagePlatform .of ("linux/amd64" );
457- URI exportUri = new URI (
458- PLATFORM_IMAGES_URL + "/docker.io/paketobuildpacks/builder:base/get?platform=linux%2Famd64" );
459- given (DockerApiTests .this .http .head (eq (new URI (PING_URL ))))
460- .willReturn (responseWithHeaders (new BasicHeader (DockerApi .API_VERSION_HEADER_NAME , "1.41" )));
461- given (DockerApiTests .this .http .get (exportUri )).willReturn (responseOf ("export.tar" ));
462- MultiValueMap <String , String > contents = new LinkedMultiValueMap <>();
463- this .api .exportLayers (reference , platform , (name , archive ) -> {
464- ByteArrayOutputStream out = new ByteArrayOutputStream ();
465- archive .writeTo (out );
466- try (TarArchiveInputStream in = new TarArchiveInputStream (
467- new ByteArrayInputStream (out .toByteArray ()))) {
468- TarArchiveEntry entry = in .getNextEntry ();
469- while (entry != null ) {
470- contents .add (name , entry .getName ());
471- entry = in .getNextEntry ();
472- }
473- }
474- });
475- assertThat (contents ).hasSize (3 )
476- .containsKeys ("70bb7a3115f3d5c01099852112c7e05bf593789e510468edb06b6a9a11fa3b73/layer.tar" ,
477- "74a9a50ece13c025cf10e9110d9ddc86c995079c34e2a22a28d1a3d523222c6e/layer.tar" ,
478- "a69532b5b92bb891fbd9fa1a6b3af9087ea7050255f59ba61a796f8555ecd783/layer.tar" );
479- assertThat (contents .get ("70bb7a3115f3d5c01099852112c7e05bf593789e510468edb06b6a9a11fa3b73/layer.tar" ))
480- .containsExactly ("/cnb/order.toml" );
481- assertThat (contents .get ("74a9a50ece13c025cf10e9110d9ddc86c995079c34e2a22a28d1a3d523222c6e/layer.tar" ))
482- .containsExactly ("/cnb/stack.toml" );
483- }
484-
485451 @ Test
486452 void tagWhenReferenceIsNullThrowsException () {
487453 ImageReference tag = ImageReference .of ("localhost:5000/ubuntu" );
0 commit comments