ci: update integration tests that expect docker manifest format from distroless image#3965
ci: update integration tests that expect docker manifest format from distroless image#3965
Conversation
…eneric manifest template
465278a to
ab1697a
Compare
…e more generic manifest template" This reverts commit ab1697a.
| Assert.assertEquals(2, manifestTargeted.getSchemaVersion()); | ||
| // Ensures call to image at KNOWN_OCI_INDEX_SHA returns an OCI index | ||
| OciIndexTemplate manifestListTargeted = | ||
| registryClient.pullManifest(KNOWN_OCI_INDEX_SHA, OciIndexTemplate.class).getManifest(); |
There was a problem hiding this comment.
Alt: instead of KNOWN_OCI_INDEX_SHA, this newly added test can keep using the "latest" tag (which keeps it susceptible for breakage but able to detect future changes in this image, as noted in #3963 (comment)).
...integration-test/java/com/google/cloud/tools/jib/registry/ManifestPullerIntegrationTest.java
Show resolved
Hide resolved
...integration-test/java/com/google/cloud/tools/jib/registry/ManifestPullerIntegrationTest.java
Show resolved
Hide resolved
| Assert.assertEquals(2, manifestListTargeted.getSchemaVersion()); | ||
| Assert.assertTrue((manifestListTargeted.getManifests().size() > 0)); | ||
|
|
||
| // Generic call to image at KNOWN_OCI_INDEX_SHA, should also return an OCI index | ||
| ManifestTemplate manifestListGeneric = | ||
| registryClient.pullManifest(KNOWN_OCI_INDEX_SHA).getManifest(); | ||
| Assert.assertEquals(2, manifestListGeneric.getSchemaVersion()); | ||
| MatcherAssert.assertThat(manifestListGeneric, CoreMatchers.instanceOf(OciIndexTemplate.class)); | ||
| Assert.assertTrue(((OciIndexTemplate) manifestListGeneric).getManifests().size() > 0); |
There was a problem hiding this comment.
nit: Perhaps we can use Truth here?
There was a problem hiding this comment.
@mpeddada1 Thanks for the suggestion! Updated assertions across this file to use Truth.assertThat where applicable.
| .newRegistryClient(); | ||
|
|
||
| // Ensure ":latest" is a manifest list | ||
| // Ensures call to image at KNOWN_MANIFEST_LIST_SHA returns a manifest list |
There was a problem hiding this comment.
minor: how about we say something like "at the specified sha`? This can prevent the comment from becoming stale if the variable name changes.
There was a problem hiding this comment.
Makes sense, updated!
|
Kudos, SonarCloud Quality Gate passed! |








Fixes #3963 to unblock CI (See issue for more error details and discussion).
Changes in this PR to address manifest format change in latest distroless image:
BlobCheckerIntegrationTestandBlobPullerIntegrationTestby using a fixed older version of the distroless imageManifestPullerIntegrationTest, and extends it to specifically cover OCI format using pinned image versions