From c98356b8816bdbefdf656961226160326dbcf645 Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Wed, 8 Nov 2023 18:35:49 +0000 Subject: [PATCH] fix test --- .github/workflows/build-test.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index ed6292dd3e..09e682e816 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -866,13 +866,18 @@ jobs: if ! grep -q 'The app was not deployed.' output.txt; then printf "Expected to see message about app not being deployed, but did not\n" - cat output.txt exit 1 fi - if ! grep -q FAIL output.txt | grep -q 'The application requires a Kubernetes 2.0.0 or later.'; then + if ! grep FAIL output.txt | grep -q 'The application requires a Kubernetes 2.0.0 or later.'; then printf "Expected to see a failure about kubernetes version, but did not\n" - cat output.txt + exit 1 + fi + + if ! kubectl logs -l app=kotsadm --namespace "$APP_SLUG" | grep -q "preflights will not be skipped, strict preflights are set to true"; then + echo "Failed to find a log line about strict preflights not being skipped in kotsadm logs" + echo "kotsadm logs:" + kubectl logs -l app=kotsadm --all-containers --namespace "$APP_SLUG" exit 1 fi