forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#20330 from loicmathieu/liquibase-mongodb-it
Native support for Liquibase MongoDB
- Loading branch information
Showing
4 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...base-mongodb/src/test/java/io/quarkus/it/liquibase/mongodb/NativeFruitResourceTestIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.quarkus.it.liquibase.mongodb; | ||
|
||
import static io.restassured.RestAssured.get; | ||
|
||
import java.util.List; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.condition.DisabledOnOs; | ||
import org.junit.jupiter.api.condition.OS; | ||
|
||
import io.quarkus.test.common.QuarkusTestResource; | ||
import io.quarkus.test.junit.NativeImageTest; | ||
import io.quarkus.test.mongodb.MongoTestResource; | ||
import io.restassured.common.mapper.TypeRef; | ||
|
||
@NativeImageTest | ||
@QuarkusTestResource(MongoTestResource.class) | ||
@DisabledOnOs(OS.WINDOWS) | ||
class NativeFruitResourceTestIT { | ||
@Test | ||
public void testTheEndpoint() { | ||
// assert that a fruit exist as one has been created in the changelog | ||
List<Fruit> list = get("/fruits").as(new TypeRef<List<Fruit>>() { | ||
}); | ||
Assertions.assertEquals(1, list.size()); | ||
} | ||
} |