Polish "Detect logback config location as xml if path ends with .xml"

See gh-37039
This commit is contained in:
Stephane Nicoll 2023-08-22 10:33:03 +02:00
parent c9cc1da48e
commit eed6e199fc
2 changed files with 1 additions and 1 deletions

View File

@ -691,7 +691,7 @@ class LogbackLoggingSystemTests extends AbstractLoggingSystemTests {
void whenConfigLocationIsNotXmlThenIllegalArgumentExceptionShouldBeThrown() {
this.loggingSystem.beforeInitialize();
assertThatIllegalStateException()
.isThrownBy(() -> initialize(this.initializationContext, "file:///logback-nonexistent.txt",
.isThrownBy(() -> initialize(this.initializationContext, "classpath:logback-invalid-format.txt",
getLogFile(tmpDir() + "/tmp.log", null)))
.satisfies((ex) -> assertThat(ex.getCause()).isInstanceOf(IllegalArgumentException.class)
.hasMessageStartingWith("Unsupported file extension"));