Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mpeddada1 committed Jun 15, 2024
1 parent 908a72b commit 693f09c
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,27 +424,27 @@ public void testDistroless_ociManifest()
CacheDirectoryCreationException, InvalidImageReferenceException {
System.out.println("testDistroless_ociManifest()");

Jib.from("alpine")
Jib.from("gcr.io/distroless/base@" + KNOWN_OCI_INDEX_SHA)
.setPlatforms(
ImmutableSet.of(new Platform("arm64", "linux"), new Platform("amd64", "linux")))
.containerize(
Containerizer.to(
RegistryImage.named(dockerHost + ":6000/jib-distroless:multi-platform"))
.setAllowInsecureRegistries(true));

V22ManifestListTemplate manifestList =
(V22ManifestListTemplate)
distrolessRegistryClient.pullManifest("multi-platform").getManifest();
Assert.assertEquals(2, manifestList.getManifests().size());
ManifestDescriptorTemplate.Platform platform1 =
manifestList.getManifests().get(0).getPlatform();
ManifestDescriptorTemplate.Platform platform2 =
manifestList.getManifests().get(1).getPlatform();

Assert.assertEquals("arm64", platform1.getArchitecture());
Assert.assertEquals("linux", platform1.getOs());
Assert.assertEquals("amd64", platform2.getArchitecture());
Assert.assertEquals("linux", platform2.getOs());
// V22ManifestListTemplate manifestList =
// (V22ManifestListTemplate)
// distrolessRegistryClient.pullManifest("multi-platform").getManifest();
// Assert.assertEquals(2, manifestList.getManifests().size());
// ManifestDescriptorTemplate.Platform platform1 =
// manifestList.getManifests().get(0).getPlatform();
// ManifestDescriptorTemplate.Platform platform2 =
// manifestList.getManifests().get(1).getPlatform();
//
// Assert.assertEquals("arm64", platform1.getArchitecture());
// Assert.assertEquals("linux", platform1.getOs());
// Assert.assertEquals("amd64", platform2.getArchitecture());
// Assert.assertEquals("linux", platform2.getOs());
}

@Test
Expand Down

0 comments on commit 693f09c

Please sign in to comment.