From 9d794a094543a30da42e00de1867f85e82dadc62 Mon Sep 17 00:00:00 2001 From: Gerrod Ubben Date: Mon, 8 Jun 2026 15:33:09 -0400 Subject: [PATCH] Filter pulp-cli livetest to the plugin under test When pulp-cli 0.40.0+ is checked out it no longer ships test_requirements.txt, so plugin CI fell back to make livetest and ran the entire live suite. Pass PYTEST_MARK to livetest so only the relevant plugin tests run, e.g. live and pulp_container. --- CHANGES/+filter-cli-livetest.bugfix | 1 + templates/github/.github/workflows/scripts/script.sh.j2 | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 CHANGES/+filter-cli-livetest.bugfix 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 %}