From 0261784443eba684e90d4ccc3d9fe21bfb3639c7 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Tue, 6 Aug 2024 09:37:53 +0200 Subject: [PATCH] Fix DockerComposeFileTests on Windows --- .../boot/docker/compose/core/DockerComposeFileTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/core/DockerComposeFileTests.java b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/core/DockerComposeFileTests.java index c5b2ccde29..95d3892d69 100644 --- a/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/core/DockerComposeFileTests.java +++ b/spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/core/DockerComposeFileTests.java @@ -70,7 +70,7 @@ class DockerComposeFileTests { @Test void findFindsSingleFile() throws Exception { - File file = new File(this.temp, "docker-compose.yml"); + File file = new File(this.temp, "docker-compose.yml").getCanonicalFile(); FileCopyUtils.copy(new byte[0], file); DockerComposeFile composeFile = DockerComposeFile.find(file.getParentFile()); assertThat(composeFile.getFiles()).containsExactly(file); @@ -78,9 +78,9 @@ class DockerComposeFileTests { @Test void findWhenMultipleFilesPicksBest() throws Exception { - File f1 = new File(this.temp, "docker-compose.yml"); + File f1 = new File(this.temp, "docker-compose.yml").getCanonicalFile(); FileCopyUtils.copy(new byte[0], f1); - File f2 = new File(this.temp, "compose.yml"); + File f2 = new File(this.temp, "compose.yml").getCanonicalFile(); FileCopyUtils.copy(new byte[0], f2); DockerComposeFile composeFile = DockerComposeFile.find(f1.getParentFile()); assertThat(composeFile.getFiles()).containsExactly(f2);