Skip to content

Commit

Permalink
Fix functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Sep 6, 2024
1 parent 52604d3 commit d174f7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal class ConfigurationCacheTest {
assertEquals(TaskOutcome.SUCCESS, result.task(":jar")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":jarOciLayer")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":ociMetadata")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":testOciRegistryData")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":testSuiteOciRegistryData")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":test")?.outcome)
testProject.assertJarOciLayer()
testProject.assertOciMetadata()
Expand All @@ -45,7 +45,7 @@ internal class ConfigurationCacheTest {
assertEquals(TaskOutcome.SUCCESS, result2.task(":jar")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result2.task(":jarOciLayer")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result2.task(":ociMetadata")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result2.task(":testOciRegistryData")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result2.task(":testSuiteOciRegistryData")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result2.task(":test")?.outcome)
testProject.assertJarOciLayer()
testProject.assertOciMetadata()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal class GradleVersionsTest {
assertEquals(TaskOutcome.SUCCESS, result.task(":jar")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":jarOciLayer")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":ociMetadata")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":testOciRegistryData")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":testSuiteOciRegistryData")?.outcome)
assertEquals(TaskOutcome.SUCCESS, result.task(":test")?.outcome)
val isBeforeGradle8 = gradleVersion.startsWith('7')
testProject.assertJarOciLayer(isBeforeGradle8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ internal class TestProject(projectDir: File) {
suites {
"test"(JvmTestSuite::class) {
useJUnitJupiter("5.10.0")
ociImageDependencies {
runtime(project)
runtime(project).tag("latest")
runtime(constraint("library:eclipse-temurin:20.0.1_9-jre-jammy"))
runtime("hivemq:hivemq4:4.16.0")
oci.of(this) {
imageDependencies {
runtime(project)
runtime(project).tag("latest")
runtime(constraint("library:eclipse-temurin:20.0.1_9-jre-jammy"))
runtime("hivemq:hivemq4:4.16.0")
}
}
}
}
Expand Down Expand Up @@ -96,7 +98,7 @@ internal class TestProject(projectDir: File) {
@Test
void test() {
assertEquals(
new File("build/oci/registries/test").getAbsolutePath(),
new File("build/oci/registries/testSuite").getAbsolutePath(),
System.getProperty("io.github.sgtsilvio.gradle.oci.registry.data.dir")
);
}
Expand Down Expand Up @@ -161,7 +163,7 @@ internal class TestProject(projectDir: File) {
expectedConfig2Digest = "1013d54d227bc8e0ecdbc989217da3325065b8c0021123065b01bb15fd9eab04"
}

val registryDir = buildDir.resolve("oci/registries/test")
val registryDir = buildDir.resolve("oci/registries/testSuite")
val blobsDir = registryDir.resolve("blobs")
// @formatter:off
assertTrue(blobsDir.resolve("sha256/1d/1d511796a8d527cf68165c8b95d6606d03c6a30a624d781f8f3682ae14797078/data").exists())
Expand Down

0 comments on commit d174f7a

Please sign in to comment.