Fix DockerComposeFileTests on Windows

This commit is contained in:
Andy Wilkinson 2023-04-19 15:36:07 +01:00
parent e33b5926c0
commit 2bccd586ea
1 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ class DockerComposeFileTests {
@Test
void toStringReturnsFileName() throws Exception {
DockerComposeFile composeFile = createComposeFile("compose.yml");
assertThat(composeFile.toString()).endsWith("/compose.yml");
assertThat(composeFile.toString()).endsWith(File.separator + "compose.yml");
}
@Test
@ -64,7 +64,7 @@ class DockerComposeFileTests {
File file = new File(this.temp, "docker-compose.yml");
FileCopyUtils.copy(new byte[0], file);
DockerComposeFile composeFile = DockerComposeFile.find(file.getParentFile());
assertThat(composeFile.toString()).endsWith("/docker-compose.yml");
assertThat(composeFile.toString()).endsWith(File.separator + "docker-compose.yml");
}
@Test
@ -74,7 +74,7 @@ class DockerComposeFileTests {
File f2 = new File(this.temp, "compose.yml");
FileCopyUtils.copy(new byte[0], f2);
DockerComposeFile composeFile = DockerComposeFile.find(f1.getParentFile());
assertThat(composeFile.toString()).endsWith("/compose.yml");
assertThat(composeFile.toString()).endsWith(File.separator + "compose.yml");
}
@Test