Skip to content

Commit

Permalink
Merge pull request quarkusio#15946 from geoand/broken-k8s-tests
Browse files Browse the repository at this point in the history
Fix broken kubernetes tests
  • Loading branch information
geoand authored Mar 23, 2021
2 parents 5ce554c + 1bed4cc commit 3a8c2ea
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void assertGeneratedResources() throws IOException {
assertThat(c.getCommand()).isNullOrEmpty();
assertThat(c.getArgs()).isNullOrEmpty();
//We explicitly remove them when using the `docker build strategy`.
assertThat(c.getEnv()).extracting("name").doesNotContain("JAVA_APP_JAR", "JAVA_LIB_DIR");
assertThat(c.getEnv()).extracting("name").doesNotContain("JAVA_APP_JAR");
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void assertGeneratedResources() throws IOException {
private void assertApplicationContainer(PodSpec podSpec) {
assertThat(podSpec.getContainers()).filteredOn(ps -> "openshift-sidecar-test".equals(ps.getName()))
.singleElement().satisfies(c -> {
assertThat(c.getEnv()).extracting("name").contains("JAVA_APP_JAR", "JAVA_LIB_DIR");
assertThat(c.getEnv()).extracting("name").contains("JAVA_APP_JAR");
});
}

Expand All @@ -83,7 +83,7 @@ private void assertSidecar(PodSpec podSpec) {
assertThat(c.getPorts()).singleElement().satisfies(p -> {
assertThat(p.getContainerPort()).isEqualTo(3000);
});
assertThat(c.getEnv()).extracting("name").doesNotContain("JAVA_APP_JAR", "JAVA_LIB_DIR");
assertThat(c.getEnv()).extracting("name").doesNotContain("JAVA_APP_JAR");
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ public void assertGeneratedResources() throws IOException {
assertThat(envVar.getName()).isEqualTo("JAVA_APP_JAR");
assertThat(envVar.getValue()).isEqualTo("/deployments/quarkus-run.jar");
});
assertThat(envVars).anySatisfy(envVar -> {
assertThat(envVar.getName()).isEqualTo("JAVA_LIB_DIR");
assertThat(envVar.getValue()).isEqualTo("/deployments/lib");
});
assertThat(envVars).anySatisfy(envVar -> {
assertThat(envVar.getName()).isEqualTo("JAVA_CLASSPATH");
assertThat(envVar.getValue()).isNotBlank();
});
assertThat(envVars).anySatisfy(envVar -> {
assertThat(envVar.getName()).isEqualTo("JAVA_OPTIONS");
assertThat(envVar.getValue())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void assertGeneratedResources() throws IOException {
private void assertApplicationContainer(PodSpec podSpec) {
assertThat(podSpec.getContainers()).filteredOn(ps -> "openshift-sidecar-test".equals(ps.getName()))
.singleElement().satisfies(c -> {
assertThat(c.getEnv()).extracting("name").contains("JAVA_APP_JAR", "JAVA_LIB_DIR");
assertThat(c.getEnv()).extracting("name").contains("JAVA_APP_JAR");
});
}

Expand All @@ -83,7 +83,7 @@ private void assertSidecar(PodSpec podSpec) {
assertThat(c.getPorts()).singleElement().satisfies(p -> {
assertThat(p.getContainerPort()).isEqualTo(3000);
});
assertThat(c.getEnv()).extracting("name").doesNotContain("JAVA_APP_JAR", "JAVA_LIB_DIR");
assertThat(c.getEnv()).extracting("name").doesNotContain("JAVA_APP_JAR");
});
}
}

0 comments on commit 3a8c2ea

Please sign in to comment.