File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/test/java/org/csanchez/jenkins/plugins/kubernetes/pipeline Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2424
2525package org .csanchez .jenkins .plugins .kubernetes .pipeline ;
2626
27+ import static jenkins .test .RunMatchers .logContains ;
2728import static org .awaitility .Awaitility .await ;
2829import static org .csanchez .jenkins .plugins .kubernetes .KubernetesTestUtil .CONTAINER_ENV_VAR_FROM_SECRET_VALUE ;
2930import static org .csanchez .jenkins .plugins .kubernetes .KubernetesTestUtil .POD_ENV_VAR_FROM_SECRET_VALUE ;
3233import static org .csanchez .jenkins .plugins .kubernetes .KubernetesTestUtil .deletePods ;
3334import static org .csanchez .jenkins .plugins .kubernetes .KubernetesTestUtil .getLabels ;
3435import static org .hamcrest .MatcherAssert .assertThat ;
36+ import static org .hamcrest .Matchers .anyOf ;
3537import static org .hamcrest .Matchers .empty ;
3638import static org .hamcrest .Matchers .emptyIterable ;
3739import static org .hamcrest .Matchers .equalTo ;
@@ -967,6 +969,8 @@ public void imageWithoutAgent() throws Exception {
967969 @ Test
968970 public void imageWithoutAgentNoJava () throws Exception {
969971 r .assertBuildStatus (Result .ABORTED , r .waitForCompletion (b ));
970- r .assertLogContains ("java: not found" , b );
972+ // Fails with older launcher scripts due to missing Java.
973+ // But Busybox also lacks Bash, used in newer scripts.
974+ assertThat (b , anyOf (logContains ("java: not found" ), logContains ("can't execute 'bash'" )));
971975 }
972976}
You can’t perform that action at this time.
0 commit comments