Make failing conformance tests also fail the build (#715)

* Setting pipefail option in github workflow and purposefully making the Redis test fail to verify that the build fails (as expected)

* Disabling in order processing for Redis (re-disabling) and Azure Service Bus
This commit is contained in:
Phil Kedy 2021-02-24 22:48:48 -05:00 committed by GitHub
parent 4a0011bcbd
commit 4f79098df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -195,6 +195,7 @@ jobs:
- name: Run tests
continue-on-error: true
run: |
set -e
KIND=$(echo ${{ matrix.component }} | cut -d. -f1)
NAME=$(echo ${{ matrix.component }} | cut -d. -f2-)
KIND_UPPER="$(tr '[:lower:]' '[:upper:]' <<< ${KIND:0:1})${KIND:1}"
@ -205,8 +206,16 @@ jobs:
echo "Running tests for Test${KIND_UPPER}Conformance/${KIND}/${NAME} ... "
set +e
go test -v -tags=conftests -count=1 ./tests/conformance \
--run="Test${KIND_UPPER}Conformance/${NAME}" 2>&1 | tee output.log
status=$?
echo "Completed tests for Test${KIND_UPPER}Conformance/${KIND}/${NAME} ... "
if test $status -ne 0; then
echo "Setting CONFORMANCE_FAILURE"
echo "CONFORMANCE_FAILURE=true" >> $GITHUB_ENV
fi
set -e
# Fail the step if we found no test to run
if grep -q "warning: no tests to run" output.log ; then
@ -229,3 +238,11 @@ jobs:
echo "Cleaning up the certificate file $CERT_FILE..."
rm $CERT_FILE
done
- name: Check conformance test passed
continue-on-error: false
run: |
echo "CONFORMANCE_FAILURE=$CONFORMANCE_FAILURE"
if [[ -v CONFORMANCE_FAILURE ]]; then
exit 1
fi

View File

@ -14,6 +14,7 @@ components:
config:
pubsubName: azure-servicebus
testTopicName: dapr-conf-test
checkInOrderProcessing: false
- component: redis
allOperations: true
config: