Upgrade to Flyway 6.3.0

Closes gh-20445
This commit is contained in:
Andy Wilkinson 2020-03-10 14:23:47 +00:00
parent 0cd8197ebf
commit d2ebd77861
2 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,6 +33,7 @@ import org.flywaydb.core.api.migration.JavaMigration;
import org.flywaydb.core.internal.license.FlywayProUpgradeRequiredException;
import org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InOrder;
import org.springframework.beans.factory.BeanCreationException;
@ -42,6 +43,8 @@ import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.boot.jdbc.SchemaManagement;
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.test.system.CapturedOutput;
import org.springframework.boot.test.system.OutputCaptureExtension;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
@ -75,6 +78,7 @@ import static org.mockito.Mockito.mock;
* @author Dominic Gunn
* @author András Deák
*/
@ExtendWith(OutputCaptureExtension.class)
class FlywayAutoConfigurationTests {
private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
@ -427,14 +431,10 @@ class FlywayAutoConfigurationTests {
}
@Test
void licenseKeyIsCorrectlyMapped() {
void licenseKeyIsCorrectlyMapped(CapturedOutput output) {
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
.withPropertyValues("spring.flyway.license-key=<<secret>>").run((context) -> {
assertThat(context).hasFailed();
Throwable failure = context.getStartupFailure();
assertThat(failure).hasRootCauseInstanceOf(FlywayProUpgradeRequiredException.class);
assertThat(failure).hasMessageContaining(" licenseKey ");
});
.withPropertyValues("spring.flyway.license-key=<<secret>>").run((context) -> assertThat(output)
.contains("<<secret>> is not supported by Flyway Community Edition"));
}
@Test

View File

@ -322,7 +322,7 @@ bom {
]
}
}
library("Flyway", "6.2.3") {
library("Flyway", "6.3.0") {
group("org.flywaydb") {
modules = [
"flyway-core"