diff --git a/CHANGES/+filter-cli-livetest.bugfix b/CHANGES/+filter-cli-livetest.bugfix new file mode 100644 index 00000000..efc9e22b --- /dev/null +++ b/CHANGES/+filter-cli-livetest.bugfix @@ -0,0 +1 @@ +Filter pulp-cli livetest runs to the plugin under test when using pulp-cli 0.40.0+. diff --git a/templates/github/.github/workflows/scripts/script.sh.j2 b/templates/github/.github/workflows/scripts/script.sh.j2 index 73e2a775..c06755d2 100755 --- a/templates/github/.github/workflows/scripts/script.sh.j2 +++ b/templates/github/.github/workflows/scripts/script.sh.j2 @@ -159,13 +159,14 @@ export PULP_FIXTURES_URL="http://pulp-fixtures:8080" {%- endif %} # some pulp-cli tests use the api root envvar export PULP_API_ROOT="$(EDITOR=cat pulp config edit 2>/dev/null | awk -F'"' '/api_root/{print $2; exit}')" +{%- set cli_plugin_markers = plugins | map(attribute='name') | join(' or ') | snake %} pushd ../{{ cli_package }} if [[ -f "test_requirements.txt" ]] then pip install -r test_requirements.txt - pytest -v tests -m "{{ plugins | map(attribute='name') | join(' or ') | snake }}" + pytest -v tests -m "{{ cli_plugin_markers }}" else - PULP_CA_BUNDLE="/usr/local/share/ca-certificates/pulp_webserver.crt" make livetest + PULP_CA_BUNDLE="/usr/local/share/ca-certificates/pulp_webserver.crt" make livetest PYTEST_MARK="live and ({{ cli_plugin_markers }})" fi popd {%- endif %}