Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package org.csanchez.jenkins.plugins.kubernetes.pipeline;

import static jenkins.test.RunMatchers.logContains;
import static org.awaitility.Awaitility.await;
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesTestUtil.CONTAINER_ENV_VAR_FROM_SECRET_VALUE;
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesTestUtil.POD_ENV_VAR_FROM_SECRET_VALUE;
Expand All @@ -32,6 +33,7 @@
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesTestUtil.deletePods;
import static org.csanchez.jenkins.plugins.kubernetes.KubernetesTestUtil.getLabels;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.emptyIterable;
import static org.hamcrest.Matchers.equalTo;
Expand Down Expand Up @@ -967,6 +969,8 @@ public void imageWithoutAgent() throws Exception {
@Test
public void imageWithoutAgentNoJava() throws Exception {
r.assertBuildStatus(Result.ABORTED, r.waitForCompletion(b));
r.assertLogContains("java: not found", b);
// Fails with older launcher scripts due to missing Java.
// But Busybox also lacks Bash, used in newer scripts.
assertThat(b, anyOf(logContains("java: not found"), logContains("can't execute 'bash'")));
}
}
Loading