Consider properties from @AutoConfigureTestDatabase

Both Flyway and Liquibase makes use of DataSourceProperties to get
default properties. Previously, both used strictly the configuration
properties and failed to consider embedded datasource properties
autoconfigured by @AutoConfigureTestDatabase. In case a database layer
test e.g. @JdbcTest relies on the autoconfigured embedded datasource,
Flyway and Liquibase autoconfiguration fails as they are not aware of
the embedded datasource properties.

See gh-16814
This commit is contained in:
András Deák
2019-05-09 22:33:03 +02:00
committed by Andy Wilkinson
parent ba85394e83
commit 92256c80d0
5 changed files with 59 additions and 6 deletions

View File

@@ -35,4 +35,5 @@
<suppress files="LogbackMetricsAutoConfiguration\.java" checks="IllegalImport" />
<suppress files="RemoteUrlPropertyExtractorTests\.java" checks="IllegalImport" />
<suppress files="SampleLogbackApplication\.java" checks="IllegalImport" />
<suppress files="FlywayAutoConfigurationTests\.java" checks="IllegalImport" />
</suppressions>