Skip to content

Commit

Permalink
Remove OciMetadata.Command > fix functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Jul 9, 2024
1 parent 70bcc93 commit 894c8c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ internal class PublishMetadataTest {
{
"name": "test-1.0.0-oci-metadata.json",
"url": "test-1.0.0-oci-metadata.json",
"size": 340,
"sha512": "76039898460aeccf8c3ba2d3a2701cdad4a27cc2b3db3859803ebd4e7d8103fa9be0886f7d50eb062f590ee469e8dbc5904611c064efa62915a46e074e0e87a2",
"sha256": "bebfcc67b3fa76940d09733ae48d6eec6499918ddda139b988a17b06fac0771f",
"sha1": "56f38dc5698b851f1faa992d449943c947eb8128",
"md5": "e6744d0ed13dfbb91bff446b09089c48"
"size": 313,
"sha512": "746de5c093ac73f3b6b693f0d2e03c608d54d341eeaa57176b6b5f24653dc277b2f65cdb2912b9abdeaec49092265c0faf4aba44b9c152e7015a8a7719fd9ac9",
"sha256": "3ad109eb16bdf9819d61d2e6a279041de00f063689726491d1325a58249efa90",
"sha1": "21ed0e46e81711a45f1788274e1da164a42d9e94",
"md5": "e6e8f26fe56934656689bc03eef083e1"
},
{
"name": "test-1.0.0-jar-oci-layer.tgz",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ internal class TestProject(projectDir: File) {
assertTrue(metadataJsonFile.exists())
// https://docs.gradle.org/current/userguide/upgrading_version_7.html#reproducible_archives_can_change_compared_to_past_versions
val expectedComponentJson = if (isBeforeGradle8) {
"""{"imageReference":"example/test:1.0.0","command":{"entryPoint":["java","-jar","app.jar"],"arguments":[]},"layers":[{"descriptor":{"digest":"sha256:9f0241cf6e0f2ddad911248fbb4592b18c4dff4d69e1dffa03080acfe61bce6c","size":704,"diffId":"sha256:f8363558d917871ea6722c762b6d4e67b0f2ac3be010ca94e4a74aead327212c"},"createdBy":"gradle-oci: jar"}]}"""
"""{"imageReference":"example/test:1.0.0","entryPoint":["java","-jar","app.jar"],"layers":[{"descriptor":{"digest":"sha256:9f0241cf6e0f2ddad911248fbb4592b18c4dff4d69e1dffa03080acfe61bce6c","size":704,"diffId":"sha256:f8363558d917871ea6722c762b6d4e67b0f2ac3be010ca94e4a74aead327212c"},"createdBy":"gradle-oci: jar"}]}"""
} else {
"""{"imageReference":"example/test:1.0.0","command":{"entryPoint":["java","-jar","app.jar"],"arguments":[]},"layers":[{"descriptor":{"digest":"sha256:e6b88907d77d29e5dd75183b8c58e75d6abe195d0594c4b8b2282c4ce75a51f0","size":704,"diffId":"sha256:bf7023a316aaf2ae2ccd50dba4990f460cfbbd2b70ee08603c2e5452e48e0865"},"createdBy":"gradle-oci: jar"}]}"""
"""{"imageReference":"example/test:1.0.0","entryPoint":["java","-jar","app.jar"],"layers":[{"descriptor":{"digest":"sha256:e6b88907d77d29e5dd75183b8c58e75d6abe195d0594c4b8b2282c4ce75a51f0","size":704,"diffId":"sha256:bf7023a316aaf2ae2ccd50dba4990f460cfbbd2b70ee08603c2e5452e48e0865"},"createdBy":"gradle-oci: jar"}]}"""
}
assertEquals(expectedComponentJson, metadataJsonFile.readText())
}
Expand Down

0 comments on commit 894c8c1

Please sign in to comment.