-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f0d031
commit fba6ef3
Showing
3 changed files
with
31 additions
and
4 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
27 changes: 27 additions & 0 deletions
27
...t-data-customsequence/src/test/java/com/example/custom/sequence/SchemaValidationTest.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,27 @@ | ||
package com.example.custom.sequence; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.example.custom.sequence.common.ContainersConfig; | ||
import com.github.gavlyukovskiy.boot.jdbc.decorator.DecoratedDataSource; | ||
import javax.sql.DataSource; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@DataJpaTest( | ||
properties = { | ||
"spring.jpa.hibernate.ddl-auto=validate", | ||
"spring.test.database.replace=none" | ||
}) | ||
@Import(ContainersConfig.class) | ||
class SchemaValidationTest { | ||
|
||
@Autowired private DataSource dataSource; | ||
|
||
@Test | ||
void validateJpaMappingsWithDbSchema() { | ||
assertThat(dataSource).isInstanceOf(DecoratedDataSource.class); | ||
} | ||
} |