|
|
@ -104,7 +104,20 @@ public class FlywayAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void overrideLocations() throws Exception {
|
|
|
|
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");
|
|
|
|
"flyway.locations[1]:classpath:db/migration");
|
|
|
|
registerAndRefresh(EmbeddedDataSourceConfiguration.class,
|
|
|
|
registerAndRefresh(EmbeddedDataSourceConfiguration.class,
|
|
|
|
FlywayAutoConfiguration.class,
|
|
|
|
FlywayAutoConfiguration.class,
|
|
|
|