Skip to content

Commit

Permalink
fix(tests): introduce @KestraTest (linked to kestra-io/kestra#3948)
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-mulier-p committed Jun 12, 2024
1 parent 1847e3c commit 6324e16
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ dependencies {
// kestra
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: "storage-local", version: kestraVersion

// test
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/kestra/plugin/mongodb/BulkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import io.kestra.core.storages.StorageInterface;
import io.kestra.core.utils.IdUtils;
import io.micronaut.context.annotation.Value;
import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import io.kestra.core.junit.annotations.KestraTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;

Expand All @@ -21,7 +21,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@MicronautTest
@KestraTest
class BulkTest {
@Inject
private RunContextFactory runContextFactory;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/kestra/plugin/mongodb/CrudTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io.kestra.core.runners.RunContext;
import io.kestra.core.runners.RunContextFactory;
import io.kestra.core.utils.IdUtils;
import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import io.kestra.core.junit.annotations.KestraTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;

Expand All @@ -15,7 +15,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@MicronautTest
@KestraTest
class CrudTest {
@Inject
private RunContextFactory runContextFactory;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/kestra/plugin/mongodb/FindTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.google.common.collect.ImmutableMap;
import io.kestra.core.runners.RunContext;
import io.kestra.core.runners.RunContextFactory;
import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import io.kestra.core.junit.annotations.KestraTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;

Expand All @@ -13,7 +13,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@MicronautTest
@KestraTest
class FindTest {
@Inject
private RunContextFactory runContextFactory;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/kestra/plugin/mongodb/LoadTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import io.kestra.core.serializers.FileSerde;
import io.kestra.core.storages.StorageInterface;
import io.kestra.core.utils.IdUtils;
import io.micronaut.test.extensions.junit5.annotation.MicronautTest;
import io.kestra.core.junit.annotations.KestraTest;
import jakarta.inject.Inject;
import org.bson.types.ObjectId;
import org.junit.jupiter.api.Test;
Expand All @@ -21,7 +21,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@MicronautTest
@KestraTest
class LoadTest {
@Inject
private RunContextFactory runContextFactory;
Expand Down

0 comments on commit 6324e16

Please sign in to comment.