From cdf58eedc9a370c7f1e045d7783567df0919a92f Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Tue, 5 Sep 2023 08:20:10 +0200 Subject: [PATCH] fix image and workflow Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> --- .github/actions/e2e_malicious_join/action.yml | 5 ++++- e2e/malicious-join/job.yaml | 7 +------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/actions/e2e_malicious_join/action.yml b/.github/actions/e2e_malicious_join/action.yml index 5225a7d0c89..699c5c211d7 100644 --- a/.github/actions/e2e_malicious_join/action.yml +++ b/.github/actions/e2e_malicious_join/action.yml @@ -23,12 +23,15 @@ runs: kubectl wait -n kube-system --for=condition=complete --timeout=10m job/malicious-join TEST_LOGS=$(kubectl logs -n kube-system job/malicious-join) JS_LOGS=$(kubectl logs -n kube-system svc/join-service) + LAST_JS_LOG=$(echo "$JS_LOGS" | tail -n 1) kubectl delete -n kube-system -f job.yaml + # The test passes if an error occurs when trying to join the cluster. if [[ "$TEST_LOGS" != *"PASS"* ]]; then echo "$TEST_LOGS" | tee -a "$GITHUB_OUTPUT" exit 1 fi - if [[ "$JS_LOGS" != *"Failed to validate attestation document: validating attestation public key"* ]]; then + # The last log of the join service should be an error message about the attestation document. + if [[ "$LAST_JS_LOG" != *"Failed to validate attestation document: validating attestation public key"* ]]; then echo "$JS_LOGS" | tee -a "$GITHUB_OUTPUT" exit 1 fi diff --git a/e2e/malicious-join/job.yaml b/e2e/malicious-join/job.yaml index 9bd2094e581..1f7851df359 100644 --- a/e2e/malicious-join/job.yaml +++ b/e2e/malicious-join/job.yaml @@ -7,11 +7,6 @@ spec: spec: containers: - name: malicious-join - image: ghcr.io/edgelesssys/malicious-join-test:0.0.1@sha256:a5c9129e7dfbf1c76a6c0ede199d89471d0d2627f7b9b7a826bdafb013420e76 - command: - - /malicious-join.test - - --js-endpoint=join-service.kube-system:9090 - - --csp=azure - - --variant=default + image: ghcr.io/edgelesssys/malicious-join-test:0.0.1@sha256:a7b1262ed13d144cd2b0bd2f5924b2596dc8acf24fbac4f044091dbe81a838ee restartPolicy: Never backoffLimit: 0 # Do not retry