Skip to content

Commit

Permalink
Modified testscript to selectively run negative cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
abdasgupta committed Jan 5, 2021
1 parent e75c9a4 commit e5b1b83
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .ci/unit_test
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ if [[ -z "${TEST_PACKAGES}" ]]; then
TEST_PACKAGES="cmd pkg"
fi

RUN_NEGATIVE=${RUN_NEGATIVE:-"true"}

GINKGO_COMMON_FLAGS="-r -timeout=1h0m0s --progress -slowSpecThreshold=180 -mod=vendor"

if [ -z $COVER ] || [ "$COVER" = false ] ; then
Expand All @@ -68,8 +70,10 @@ if [ -z $COVER ] || [ "$COVER" = false ] ; then
# run everything which is not part of negative scenarios with randomizeAllSpecs parameters.
ginkgo -race -trace $GINKGO_COMMON_FLAGS -gcflags=all=-d=checkptr=0 --randomizeAllSpecs --randomizeSuites --failOnPending --skip="NEGATIVE\:.*" ${TEST_PACKAGES}

#run negative scenario in a sequenced manner (removed failOnPending as one spec in restore test is marked as 'X' for excluding)
ginkgo -race -trace $GINKGO_COMMON_FLAGS -gcflags=all=-d=checkptr=0 --focus="NEGATIVE\:.*" ${TEST_PACKAGES}
if [ "$RUN_NEGATIVE" = "true" ] ; then
#run negative scenario in a sequenced manner (removed failOnPending as one spec in restore test is marked as 'X' for excluding)
ginkgo -race -trace $GINKGO_COMMON_FLAGS -gcflags=all=-d=checkptr=0 --focus="NEGATIVE\:.*" ${TEST_PACKAGES}
fi

else
test_with_coverage
Expand Down

0 comments on commit e5b1b83

Please sign in to comment.