Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate functional tests to Kotlin and Junit part 5 #1134

Merged
merged 21 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Convert ShadowJarCachingSpec
  • Loading branch information
Goooler committed Jan 9, 2025
commit ca0c3b03a8c01620ee99d6b16f1d7e4901ae48f0

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ abstract class BasePluginTest {
}

val testJar: Path = requireNotNull(this::class.java.classLoader.getResource("junit-3.8.2.jar")).toURI().toPath()
val artifactJar: Path = requireNotNull(this::class.java.classLoader.getResource("test-artifact-1.0-SNAPSHOT.jar")).toURI().toPath()
val projectJar: Path = requireNotNull(this::class.java.classLoader.getResource("test-project-1.0-SNAPSHOT.jar")).toURI().toPath()

val shadowJar: String = """
tasks.named('$SHADOW_JAR_TASK_NAME', ${ShadowJar::class.java.name})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.github.jengelman.gradle.plugins.shadow.util.doesNotContainEntries
import com.github.jengelman.gradle.plugins.shadow.util.isRegular
import kotlin.io.path.appendText
import kotlin.io.path.readText
import kotlin.io.path.toPath
import kotlin.io.path.writeText
import org.gradle.api.plugins.JavaPlugin
import org.gradle.testfixtures.ProjectBuilder
Expand Down Expand Up @@ -83,11 +82,6 @@ class ShadowPluginTest : BasePluginTest() {

@Test
fun shadowCopy() {
val artifactJar = requireNotNull(this::class.java.classLoader.getResource("test-artifact-1.0-SNAPSHOT.jar"))
.toURI().toPath()
val projectJar = requireNotNull(this::class.java.classLoader.getResource("test-project-1.0-SNAPSHOT.jar"))
.toURI().toPath()

projectScriptPath.appendText(
"""
$shadowJar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ abstract class BaseCachingTest : BasePluginTest() {
@TempDir
lateinit var alternateDir: Path

/**
* TODO: have to invistigate why `:` is necessary here.
*/
override val shadowJarTask: String = ":" + super.shadowJarTask

@BeforeEach
override fun setup() {
super.setup()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ import kotlin.io.path.writeText
import org.junit.jupiter.api.Test

class RelocationCachingTest : BaseCachingTest() {
/**
* TODO: have to invistigate why `:` is necessary here.
*/
override val shadowJarTask: String = ":" + super.shadowJarTask

/**
* Ensure that we get a cache miss when relocation changes and that caching works with relocation
*/
Expand Down
Loading