use of liquibase.integration.spring.SpringLiquibase in project spring-boot by spring-projects.
the class LiquibaseAutoConfigurationTests method testDefaultSpringLiquibase.
@Test
public void testDefaultSpringLiquibase() throws Exception {
this.context.register(EmbeddedDataSourceConfiguration.class, LiquibaseAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();
SpringLiquibase liquibase = this.context.getBean(SpringLiquibase.class);
assertThat(liquibase.getChangeLog()).isEqualTo("classpath:/db/changelog/db.changelog-master.yaml");
assertThat(liquibase.getContexts()).isNull();
assertThat(liquibase.getDefaultSchema()).isNull();
assertThat(liquibase.isDropFirst()).isFalse();
}
use of liquibase.integration.spring.SpringLiquibase in project spring-boot by spring-projects.
the class LiquibaseAutoConfigurationTests method testOverrideContexts.
@Test
public void testOverrideContexts() throws Exception {
EnvironmentTestUtils.addEnvironment(this.context, "liquibase.contexts:test, production");
this.context.register(EmbeddedDataSourceConfiguration.class, LiquibaseAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();
SpringLiquibase liquibase = this.context.getBean(SpringLiquibase.class);
assertThat(liquibase.getContexts()).isEqualTo("test, production");
}
use of liquibase.integration.spring.SpringLiquibase in project spring-boot by spring-projects.
the class LiquibaseAutoConfigurationTests method testOverrideLabels.
@Test
public void testOverrideLabels() throws Exception {
EnvironmentTestUtils.addEnvironment(this.context, "liquibase.labels:test, production");
this.context.register(EmbeddedDataSourceConfiguration.class, LiquibaseAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();
SpringLiquibase liquibase = this.context.getBean(SpringLiquibase.class);
assertThat(liquibase.getLabels()).isEqualTo("test, production");
}
use of liquibase.integration.spring.SpringLiquibase in project spring-boot by spring-projects.
the class LiquibaseAutoConfigurationTests method testLiquibaseDataSource.
@Test
public void testLiquibaseDataSource() {
this.context.register(LiquibaseDataSourceConfiguration.class, EmbeddedDataSourceConfiguration.class, LiquibaseAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();
SpringLiquibase liquibase = this.context.getBean(SpringLiquibase.class);
assertThat(liquibase.getDataSource()).isEqualTo(this.context.getBean("liquibaseDataSource"));
}
Aggregations