|
|
|
|
@ -104,7 +104,20 @@ public class FlywayAutoConfigurationTests {
@@ -104,7 +104,20 @@ public class FlywayAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void overrideLocations() throws Exception { |
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context, "flyway.locations[0]:classpath:db/changelog", |
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context, |
|
|
|
|
"flyway.locations:classpath:db/changelog,classpath:db/migration"); |
|
|
|
|
registerAndRefresh(EmbeddedDataSourceConfiguration.class, |
|
|
|
|
FlywayAutoConfiguration.class, |
|
|
|
|
PropertyPlaceholderAutoConfiguration.class); |
|
|
|
|
Flyway flyway = this.context.getBean(Flyway.class); |
|
|
|
|
assertEquals("[classpath:db/changelog, classpath:db/migration]", |
|
|
|
|
Arrays.asList(flyway.getLocations()).toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void overrideLocationsList() throws Exception { |
|
|
|
|
EnvironmentTestUtils.addEnvironment(this.context, |
|
|
|
|
"flyway.locations[0]:classpath:db/changelog", |
|
|
|
|
"flyway.locations[1]:classpath:db/migration"); |
|
|
|
|
registerAndRefresh(EmbeddedDataSourceConfiguration.class, |
|
|
|
|
FlywayAutoConfiguration.class, |
|
|
|
|
|