92 final Optional<String> actualDockerComposeFileContents =
getFileContents(zipInput, ROOT_DIR +
"docker-compose.yaml");
94 assertThat(
"Could not find docker-compose.yaml file in zip archive response", actualDockerComposeFileContents.isPresent(), equalTo(
true));
96 List<String> expectedDockerComposeAsStringLines = FileUtils.readLines(
new File(
"src/test/resources/docker-compose-expected.yaml"), Charset.defaultCharset());
97 String[] actualDockerComposeAsStringLines = actualDockerComposeFileContents.get().split(
"\n");
99 String messageIfTestFails =
"Invalid docker-compose file contents: \n" + actualDockerComposeFileContents.get();
100 for (
int i = 0; i < expectedDockerComposeAsStringLines.size(); i++) {
101 assertEquals(messageIfTestFails, expectedDockerComposeAsStringLines.get(i), actualDockerComposeAsStringLines[i]);
static Optional< String > getFileContents(final ZipInputStream zipInputStream, final String fileName)
Definition: DockerComposeYamlInstallationProviderTest.java:170