-
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
e068950
commit 57c6398
Showing
4 changed files
with
17 additions
and
5 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
16 changes: 14 additions & 2 deletions
16
...ler/boot-scheduler-shedlock/src/test/java/com/learning/shedlock/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 |
---|---|---|
@@ -1,14 +1,26 @@ | ||
package com.learning.shedlock; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.learning.shedlock.common.ContainersConfig; | ||
import com.zaxxer.hikari.HikariDataSource; | ||
import javax.sql.DataSource; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; | ||
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"}) | ||
@DataJpaTest(properties = {"spring.jpa.hibernate.ddl-auto=validate"}) | ||
@Import(ContainersConfig.class) | ||
@AutoConfigureTestDatabase | ||
class SchemaValidationTest { | ||
|
||
@Autowired | ||
private DataSource dataSource; | ||
|
||
@Test | ||
void validateJpaMappingsWithDbSchema() {} | ||
void validateJpaMappingsWithDbSchema() { | ||
assertThat(dataSource).isInstanceOf(HikariDataSource.class); | ||
} | ||
} |
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