Skip to content

Commit

Permalink
Fix error handling for testing kyma in upgrade plan (kyma-project#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok authored Apr 2, 2019
1 parent a8d75dd commit a7fa9f3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions prow/scripts/cluster-integration/kyma-gke-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -443,15 +443,18 @@ function testKyma() {
shout "Test Kyma end-to-end upgrade scenarios"
date

set +o errexit
helm test "${UPGRADE_TEST_RELEASE_NAME}" --timeout "${UPGRADE_TEST_HELM_TIMEOUT_SEC}"
testEndToEndResult=$?

echo "Test e2e upgrade logs: "
kubectl logs -n "${UPGRADE_TEST_NAMESPACE}" -l "${UPGRADE_TEST_RESOURCE_LABEL}=${UPGRADE_TEST_LABEL_VALUE_EXECUTE}"

if [ "${testEndToEndResult}" != 0 ]; then
echo "Helm test operation failed: ${testEndToEndResult}"
exit "${testEndToEndResult}"
fi

echo "Test e2e upgrade logs: "
kubectl logs -n "${UPGRADE_TEST_NAMESPACE}" -l "${UPGRADE_TEST_RESOURCE_LABEL}=${UPGRADE_TEST_LABEL_VALUE_EXECUTE}"
set -o errexit
}

# Used to detect errors for logging purposes
Expand Down

0 comments on commit a7fa9f3

Please sign in to comment.