@ -102,7 +102,7 @@ class LiquibaseAutoConfigurationTests {
void defaultSpringLiquibase ( ) {
this . contextRunner . withUserConfiguration ( EmbeddedDataSourceConfiguration . class )
. run ( assertLiquibase ( ( liquibase ) - > {
assertThat ( liquibase . getChangeLog ( ) ) . isEqualTo ( "classpath: db/changelog/db.changelog-master.yaml") ;
assertThat ( liquibase . getChangeLog ( ) ) . isEqualTo ( "classpath: / db/changelog/db.changelog-master.yaml") ;
assertThat ( liquibase . getContexts ( ) ) . isNull ( ) ;
assertThat ( liquibase . getDefaultSchema ( ) ) . isNull ( ) ;
assertThat ( liquibase . isDropFirst ( ) ) . isFalse ( ) ;
@ -112,26 +112,26 @@ class LiquibaseAutoConfigurationTests {
@Test
void changelogXml ( ) {
this . contextRunner . withUserConfiguration ( EmbeddedDataSourceConfiguration . class )
. withPropertyValues ( "spring.liquibase.change-log:classpath: db/changelog/db.changelog-override.xml")
. withPropertyValues ( "spring.liquibase.change-log:classpath: / db/changelog/db.changelog-override.xml")
. run ( assertLiquibase ( ( liquibase ) - > assertThat ( liquibase . getChangeLog ( ) )
. isEqualTo ( "classpath: db/changelog/db.changelog-override.xml") ) ) ;
. isEqualTo ( "classpath: / db/changelog/db.changelog-override.xml") ) ) ;
}
@Test
void changelogJson ( ) {
this . contextRunner . withUserConfiguration ( EmbeddedDataSourceConfiguration . class )
. withPropertyValues ( "spring.liquibase.change-log:classpath: db/changelog/db.changelog-override.json")
. withPropertyValues ( "spring.liquibase.change-log:classpath: / db/changelog/db.changelog-override.json")
. run ( assertLiquibase ( ( liquibase ) - > assertThat ( liquibase . getChangeLog ( ) )
. isEqualTo ( "classpath: db/changelog/db.changelog-override.json") ) ) ;
. isEqualTo ( "classpath: / db/changelog/db.changelog-override.json") ) ) ;
}
@Test
@EnabledOnJre ( JRE . JAVA_8 )
void changelogSql ( ) {
this . contextRunner . withUserConfiguration ( EmbeddedDataSourceConfiguration . class )
. withPropertyValues ( "spring.liquibase.change-log:classpath: db/changelog/db.changelog-override.sql")
. withPropertyValues ( "spring.liquibase.change-log:classpath: / db/changelog/db.changelog-override.sql")
. run ( assertLiquibase ( ( liquibase ) - > assertThat ( liquibase . getChangeLog ( ) )
. isEqualTo ( "classpath: db/changelog/db.changelog-override.sql") ) ) ;
. isEqualTo ( "classpath: / db/changelog/db.changelog-override.sql") ) ) ;
}
@Test
@ -381,7 +381,7 @@ class LiquibaseAutoConfigurationTests {
@Bean
SpringLiquibase springLiquibase ( DataSource dataSource ) {
SpringLiquibase liquibase = new SpringLiquibase ( ) ;
liquibase . setChangeLog ( "classpath: db/changelog/db.changelog-master.yaml") ;
liquibase . setChangeLog ( "classpath: / db/changelog/db.changelog-master.yaml") ;
liquibase . setShouldRun ( true ) ;
liquibase . setDataSource ( dataSource ) ;
return liquibase ;