Skip to content

Commit 2bccd58

Browse files
committed
Fix DockerComposeFileTests on Windows
1 parent e33b592 commit 2bccd58

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
@@ -56,15 +56,15 @@ void hashCodeAndEquals() throws Exception {
5656
@Test
5757
void toStringReturnsFileName() throws Exception {
5858
DockerComposeFile composeFile = createComposeFile("compose.yml");
59-
assertThat(composeFile.toString()).endsWith("/compose.yml");
59+
assertThat(composeFile.toString()).endsWith(File.separator + "compose.yml");
6060
}
6161

6262
@Test
6363
void findFindsSingleFile() throws Exception {
6464
File file = new File(this.temp, "docker-compose.yml");
6565
FileCopyUtils.copy(new byte[0], file);
6666
DockerComposeFile composeFile = DockerComposeFile.find(file.getParentFile());
67-
assertThat(composeFile.toString()).endsWith("/docker-compose.yml");
67+
assertThat(composeFile.toString()).endsWith(File.separator + "docker-compose.yml");
6868
}
6969

7070
@Test
@@ -74,7 +74,7 @@ void findWhenMultipleFilesPicksBest() throws Exception {
7474
File f2 = new File(this.temp, "compose.yml");
7575
FileCopyUtils.copy(new byte[0], f2);
7676
DockerComposeFile composeFile = DockerComposeFile.find(f1.getParentFile());
77-
assertThat(composeFile.toString()).endsWith("/compose.yml");
77+
assertThat(composeFile.toString()).endsWith(File.separator + "compose.yml");
7878
}
7979

8080
@Test

0 commit comments

Comments
 (0)