diff --git a/build.gradle b/build.gradle index f1dd80d..02aa1e0 100644 --- a/build.gradle +++ b/build.gradle @@ -87,6 +87,7 @@ dependencies { // test deps needed only for to have a runner testAnnotationProcessor group: "io.kestra", name: "processor", version: kestraVersion testImplementation group: "io.kestra", name: "core", version: kestraVersion + testImplementation group: "io.kestra", name: "core", version: kestraVersion, classifier: "tests" testImplementation group: "io.kestra", name: "repository-memory", version: kestraVersion testImplementation group: "io.kestra", name: "runner-memory", version: kestraVersion testImplementation group: "io.kestra", name: "storage-local", version: kestraVersion diff --git a/src/test/java/io/kestra/plugin/templates/ExampleRunnerTest.java b/src/test/java/io/kestra/plugin/templates/ExampleRunnerTest.java index 93bb336..9102bbc 100644 --- a/src/test/java/io/kestra/plugin/templates/ExampleRunnerTest.java +++ b/src/test/java/io/kestra/plugin/templates/ExampleRunnerTest.java @@ -1,12 +1,12 @@ package io.kestra.plugin.templates; -import io.micronaut.test.extensions.junit5.annotation.MicronautTest; +import io.kestra.core.junit.annotations.KestraTest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import io.kestra.core.models.executions.Execution; import io.kestra.core.repositories.LocalFlowRepositoryLoader; import io.kestra.core.runners.RunnerUtils; -import io.kestra.runner.memory.MemoryRunner; +import io.kestra.core.runners.StandAloneRunner; import jakarta.inject.Inject; import java.io.IOException; @@ -25,10 +25,10 @@ * configuration file in `src/test/resources/application.yml` that is only for the full runner * test to configure in-memory runner. */ -@MicronautTest +@KestraTest class ExampleRunnerTest { @Inject - protected MemoryRunner runner; + protected StandAloneRunner runner; @Inject protected RunnerUtils runnerUtils; diff --git a/src/test/java/io/kestra/plugin/templates/ExampleTest.java b/src/test/java/io/kestra/plugin/templates/ExampleTest.java index 48cfb7a..76274cb 100644 --- a/src/test/java/io/kestra/plugin/templates/ExampleTest.java +++ b/src/test/java/io/kestra/plugin/templates/ExampleTest.java @@ -1,7 +1,7 @@ package io.kestra.plugin.templates; import com.google.common.collect.ImmutableMap; -import io.micronaut.test.extensions.junit5.annotation.MicronautTest; +import io.kestra.core.junit.annotations.KestraTest; import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.Test; import io.kestra.core.runners.RunContext; @@ -16,7 +16,7 @@ * This test will only test the main task, this allow you to send any input * parameters to your task and test the returning behaviour easily. */ -@MicronautTest +@KestraTest class ExampleTest { @Inject private RunContextFactory runContextFactory;