From 75ffbc921d51e7d8661e05007eae49a759950b1e Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 17 May 2023 17:45:34 +0100 Subject: [PATCH] Account for new loggers property in FlywayPropertiesTets See gh-35158 --- .../autoconfigure/flyway/FlywayPropertiesTests.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java index e8adc2b013..98c3454b22 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java @@ -95,6 +95,12 @@ class FlywayPropertiesTests { assertThat(properties.isExecuteInTransaction()).isEqualTo(configuration.isExecuteInTransaction()); } + @Test + void loggersIsOverriddenToSlf4j() { + assertThat(new FluentConfiguration().getLoggers()).containsExactly("auto"); + assertThat(new FlywayProperties().getLoggers()).containsExactly("slf4j"); + } + @Test void expectedPropertiesAreManaged() { Map properties = indexProperties( @@ -109,8 +115,8 @@ class FlywayPropertiesTests { ignoreProperties(configuration, "callbacks", "classLoader", "dataSource", "javaMigrations", "javaMigrationClassProvider", "pluginRegister", "resourceProvider", "resolvers"); // Properties we don't want to expose - ignoreProperties(configuration, "resolversAsClassNames", "callbacksAsClassNames", "loggers", "driver", - "modernConfig", "currentResolvedEnvironment", "reportFilename"); + ignoreProperties(configuration, "resolversAsClassNames", "callbacksAsClassNames", "driver", "modernConfig", + "currentResolvedEnvironment", "reportFilename"); // Handled by the conversion service ignoreProperties(configuration, "baselineVersionAsString", "encodingAsString", "locationsAsStrings", "targetAsString");