Skip to content

Commit

Permalink
Only use published/prebuilt bindings in the 'pulp' test scenario
Browse files Browse the repository at this point in the history
This is to prevent using clients built from different pulpcore
versions than those installed in the server scenario we want to
tests.

Co-authored-by: Matthias Dellweg <[email protected]>
Closes #917
  • Loading branch information
pedro-psb authored and mdellweg committed Oct 9, 2024
1 parent 17472a1 commit 83866f2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions templates/github/.github/workflows/scripts/script.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ pushd ../pulp-openapi-generator

# Workaround: Domains are not supported by the published bindings.
# Sadly: Different pulpcore-versions aren't either...
# So we exclude the prebuilt ones only for domains disabled.
if [ "$(jq -r '.domain_enabled' <<<"${REPORTED_STATUS}")" = "true" ] || [ "$(jq -r '.online_workers[0].pulp_href|startswith("/pulp/api/v3/")' <<< "${REPORTED_STATUS}")" = "false" ]
# * In the 'pulp' scenario we use the published/prebuilt bindings, so we can test it.
# * In other scenarios we generate new bindings from server spec, so we have a more
# reliable client.
if [ "$TEST" = "pulp" ]
then
BUILT_CLIENTS=""
else
BUILT_CLIENTS="{% for plugin in plugins %} {{ plugin.app_label }}{% endfor %} "
else
BUILT_CLIENTS=""
fi

for ITEM in $(jq -r '.versions[] | tojson' <<<"${REPORTED_STATUS}")
Expand Down

0 comments on commit 83866f2

Please sign in to comment.