Skip to content

Commit

Permalink
ci: update BlobChecker and BlobPuller integration tests to use more g…
Browse files Browse the repository at this point in the history
…eneric manifest template
  • Loading branch information
emmileaf committed Mar 23, 2023
1 parent e50b825 commit ab1697a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.google.cloud.tools.jib.api.RegistryException;
import com.google.cloud.tools.jib.event.EventHandlers;
import com.google.cloud.tools.jib.http.FailoverHttpClient;
import com.google.cloud.tools.jib.image.json.V22ManifestTemplate;
import com.google.cloud.tools.jib.image.json.BuildableManifestTemplate;
import java.io.IOException;
import java.security.DigestException;
import org.junit.Assert;
Expand All @@ -36,8 +36,8 @@ public void testCheck_exists() throws IOException, RegistryException {
RegistryClient registryClient =
RegistryClient.factory(EventHandlers.NONE, "gcr.io", "distroless/base", httpClient)
.newRegistryClient();
V22ManifestTemplate manifestTemplate =
registryClient.pullManifest("latest", V22ManifestTemplate.class).getManifest();
BuildableManifestTemplate manifestTemplate =
registryClient.pullManifest("latest", BuildableManifestTemplate.class).getManifest();
DescriptorDigest blobDigest = manifestTemplate.getLayers().get(0).getDigest();

Assert.assertEquals(blobDigest, registryClient.checkBlob(blobDigest).get().getDigest());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.google.cloud.tools.jib.blob.Blob;
import com.google.cloud.tools.jib.event.EventHandlers;
import com.google.cloud.tools.jib.http.FailoverHttpClient;
import com.google.cloud.tools.jib.image.json.V22ManifestTemplate;
import com.google.cloud.tools.jib.image.json.BuildableManifestTemplate;
import com.google.common.io.ByteStreams;
import java.io.IOException;
import java.security.DigestException;
Expand All @@ -41,8 +41,8 @@ public void testPull() throws IOException, RegistryException {
RegistryClient registryClient =
RegistryClient.factory(EventHandlers.NONE, "gcr.io", "distroless/base", httpClient)
.newRegistryClient();
V22ManifestTemplate manifestTemplate =
registryClient.pullManifest("latest", V22ManifestTemplate.class).getManifest();
BuildableManifestTemplate manifestTemplate =
registryClient.pullManifest("latest", BuildableManifestTemplate.class).getManifest();

DescriptorDigest realDigest = manifestTemplate.getLayers().get(0).getDigest();

Expand Down

0 comments on commit ab1697a

Please sign in to comment.