Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only][full-ci] removed api tag from antivirus test #6957

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ CORE_BEHAT_YML=tests/acceptance/config/behat-core.yml

.PHONY: test-acceptance-api
test-acceptance-api: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) $(PWD)/tests/acceptance/run.sh --type api
BEHAT_BIN=$(BEHAT_BIN) $(PWD)/tests/acceptance/run.sh

.PHONY: test-acceptance-from-core-api
test-acceptance-from-core-api: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) BEHAT_YML=$(CORE_BEHAT_YML) $(PWD)/tests/acceptance/run.sh --type core-api

.PHONY: test-paralleldeployment-api
test-paralleldeployment-api: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) BEHAT_YML=$(PARALLEL_BEHAT_YML) $(PWD)/tests/acceptance/run.sh --type api
BEHAT_BIN=$(BEHAT_BIN) BEHAT_YML=$(PARALLEL_BEHAT_YML) $(PWD)/tests/acceptance/run.sh

vendor/bamarni/composer-bin-plugin: composer.lock
composer install
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/features/apiAntivirus/antivirus.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@api @antivirus @skipOnReva
@antivirus @skipOnReva
Feature: antivirus
As a system administrator and user
I want to protect myself and others from known viruses
Expand Down
14 changes: 7 additions & 7 deletions tests/acceptance/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ function run_behat_tests() {
# Report them in a dry-run so they can be seen
# Big red error output is displayed if there are no matching scenarios - send it to null
DRY_RUN_FILE=$(mktemp)
SKIP_TAGS="${TEST_TYPE_TAG}&&@skip"
SKIP_TAGS="@skip"
${BEHAT} --dry-run {$COLORS_OPTION} -c ${BEHAT_YML} -f pretty ${BEHAT_SUITE_OPTION} --tags "${SKIP_TAGS}" ${BEHAT_FEATURE} 1>${DRY_RUN_FILE} 2>/dev/null
if grep -q -m 1 'No scenarios' "${DRY_RUN_FILE}"
then
Expand Down Expand Up @@ -477,20 +477,17 @@ else
fi
fi

TEST_TYPE_TAG="@api"

TEST_TYPE_TEXT="API"

# Always have "@api"
if [ -z "${BEHAT_FILTER_TAGS}" ]
if [ ! -z "${BEHAT_FILTER_TAGS}" ]
then
BEHAT_FILTER_TAGS="${TEST_TYPE_TAG}"
else
# Be nice to the caller
# Remove any extra "&&" at the end of their tags list
BEHAT_FILTER_TAGS="${BEHAT_FILTER_TAGS%&&}"
# Remove any extra "&&" at the beginning of their tags list
BEHAT_FILTER_TAGS="${BEHAT_FILTER_TAGS#&&}"
BEHAT_FILTER_TAGS="${BEHAT_FILTER_TAGS}&&${TEST_TYPE_TAG}"
fi

# EMAIL_HOST defines where the system-under-test can find the email server (inbucket)
Expand All @@ -517,9 +514,12 @@ fi
# If the caller did not mention specific tags, skip the skipped tests by default
if [ "${BEHAT_TAGS_OPTION_FOUND}" = false ]
then
if [[ -z $BEHAT_FILTER_TAGS ]]
then
BEHAT_FILTER_TAGS="~@skip"
# If the caller has already specified specifically to run "@skip" scenarios
# then do not append "not @skip"
if [[ ! ${BEHAT_FILTER_TAGS} =~ "&&@skip&&" ]]
elif [[ ! ${BEHAT_FILTER_TAGS} =~ (^|&)@skip(&|$) ]]
then
BEHAT_FILTER_TAGS="${BEHAT_FILTER_TAGS}&&~@skip"
fi
Expand Down