Skip to content

Commit

Permalink
Merge pull request #608 from pulp/patchback/backports/3.39/b0dd4529fc…
Browse files Browse the repository at this point in the history
…a3ae5f1604fb6af3583384b2e5f197/pr-604

[PR #604/b0dd4529 backport][3.39] Get correct version of pulp-cli tests
  • Loading branch information
mdellweg authored Mar 7, 2024
2 parents f2ea7ea + 82deef0 commit 5f75f0a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/603.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ensure we are using the correct verion of pulp-cli tests
18 changes: 14 additions & 4 deletions images/s6_assets/pulp_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,26 @@ echo "Base Address: $BASE_ADDR"
grep "127.0.0.1 pulp" /etc/hosts || echo "127.0.0.1 pulp" | sudo tee -a /etc/hosts

echo "Installing Pulp-CLI"
pip install pulp-cli

# Retreive installed pulp-cli version
PULP_CLI_VERSION=$(python3 -c \
'import importlib.metadata; \
from packaging.version import Version; \
print(Version(importlib.metadata.version("pulp-cli")))')

# Checkout git repo for pulp-cli at correct version to fetch tests
if [ -d pulp-cli ]; then
cd pulp-cli
git fetch origin
git reset --hard origin/main
git fetch --tags origin
git reset --hard $PULP_CLI_VERSION
else
git clone --depth=1 https://github.com/pulp/pulp-cli.git
git clone --depth=1 https://github.com/pulp/pulp-cli.git -b "${PULP_CLI_VERSION}"
cd pulp-cli
fi

pip install -r test_requirements.txt || pip install --no-build-isolation -r test_requirements.txt
pip install pulp-cli

if [ -e tests/cli.toml ]; then
mv tests/cli.toml "tests/cli.toml.bak.$(date -R)"
fi
Expand Down

0 comments on commit 5f75f0a

Please sign in to comment.