From d2ebd77861aaa341dc0b69102577c0fd84ceb35a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 10 Mar 2020 14:23:47 +0000 Subject: [PATCH] Upgrade to Flyway 6.3.0 Closes gh-20445 --- .../flyway/FlywayAutoConfigurationTests.java | 16 ++++++++-------- .../spring-boot-dependencies/build.gradle | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java index a814ecd822f..a1e2c9b8ee9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfigurationTests.java @@ -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=<>").run((context) -> { - assertThat(context).hasFailed(); - Throwable failure = context.getStartupFailure(); - assertThat(failure).hasRootCauseInstanceOf(FlywayProUpgradeRequiredException.class); - assertThat(failure).hasMessageContaining(" licenseKey "); - }); + .withPropertyValues("spring.flyway.license-key=<>").run((context) -> assertThat(output) + .contains("<> is not supported by Flyway Community Edition")); } @Test diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 9964f53c910..22adaef9a03 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -322,7 +322,7 @@ bom { ] } } - library("Flyway", "6.2.3") { + library("Flyway", "6.3.0") { group("org.flywaydb") { modules = [ "flyway-core"