Skip to content

Commit

Permalink
Use correct version of pulp-cli during tests
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
gerrod3 committed Oct 8, 2024
1 parent 1f62b4c commit e11df6b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions s6_images/assets/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,21 @@ do
done
curl --insecure --fail $scheme://localhost:8080/pulp/api/v3/status/ | jq

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")))')

if [[ ${image} != *"galaxy"* ]];then
docker exec pulp pulpcore-manager reset-admin-password --password password
echo 127.0.0.1 pulp | sudo tee -a /etc/hosts
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
pip install -r test_requirements.txt || pip install --no-build-isolation -r test_requirements.txt
pip install pulp-cli
pulp config create --base-url $scheme://pulp:8080 --username "admin" --password "password" --location tests/cli.toml
if [[ "$scheme" == "https" ]];then
sudo docker cp pulp:/etc/pulp/certs/pulp_webserver.crt /usr/local/share/ca-certificates/pulp_webserver.crt
Expand Down

0 comments on commit e11df6b

Please sign in to comment.