Skip to content

Commit 0261784

Browse files
committed
Fix DockerComposeFileTests on Windows
1 parent abe3ee6 commit 0261784

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-boot-project/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/core/DockerComposeFileTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ void toStringReturnsFileNameList() throws Exception {
7070

7171
@Test
7272
void findFindsSingleFile() throws Exception {
73-
File file = new File(this.temp, "docker-compose.yml");
73+
File file = new File(this.temp, "docker-compose.yml").getCanonicalFile();
7474
FileCopyUtils.copy(new byte[0], file);
7575
DockerComposeFile composeFile = DockerComposeFile.find(file.getParentFile());
7676
assertThat(composeFile.getFiles()).containsExactly(file);
7777
}
7878

7979
@Test
8080
void findWhenMultipleFilesPicksBest() throws Exception {
81-
File f1 = new File(this.temp, "docker-compose.yml");
81+
File f1 = new File(this.temp, "docker-compose.yml").getCanonicalFile();
8282
FileCopyUtils.copy(new byte[0], f1);
83-
File f2 = new File(this.temp, "compose.yml");
83+
File f2 = new File(this.temp, "compose.yml").getCanonicalFile();
8484
FileCopyUtils.copy(new byte[0], f2);
8585
DockerComposeFile composeFile = DockerComposeFile.find(f1.getParentFile());
8686
assertThat(composeFile.getFiles()).containsExactly(f2);

0 commit comments

Comments
 (0)