@@ -7,35 +7,34 @@ set -eu
77pulp debug has-plugin --name " ansible" || exit 23
88
99cleanup () {
10- pulp ansible repository destroy --name " cli_test_ansible_repository " || true
11- pulp ansible repository destroy --name " cli_test_ansible_repository_verify " || true
12- pulp ansible repository destroy --name " cli_test_ansible_repository_upload " || true
10+ pulp ansible repository destroy --name " cli_test_ansible_content_repository " || true
11+ pulp ansible repository destroy --name " cli_test_ansible_content_repository_verify " || true
12+ pulp ansible repository destroy --name " cli_test_ansible_content_repository_upload " || true
1313}
1414trap cleanup EXIT
1515
16- pulp orphan cleanup --protection-time 0
1716
1817if pulp debug has-plugin --name " ansible" --specifier " >=0.15.0"
1918then
2019 gpg --output pulp_pubkey.key --armor --export " pulp-fixture-signing-key"
21- expect_succ pulp ansible repository create --name " cli_test_ansible_repository_verify " --gpgkey @pulp_pubkey.key
20+ expect_succ pulp ansible repository create --name " cli_test_ansible_content_repository_verify " --gpgkey @pulp_pubkey.key
2221else
23- expect_succ pulp ansible repository create --name " cli_test_ansible_repository_verify "
22+ expect_succ pulp ansible repository create --name " cli_test_ansible_content_repository_verify "
2423fi
2524
2625# Test ansible collection-version upload
2726wget " https://galaxy.ansible.com/download/ansible-posix-1.3.0.tar.gz"
2827sha256=$( sha256sum ansible-posix-1.3.0.tar.gz | cut -d' ' -f1)
2928
30- expect_succ pulp ansible repository create --name " cli_test_ansible_repository_upload "
31- expect_succ pulp ansible content upload --file " ansible-posix-1.3.0.tar.gz" --repository " cli_test_ansible_repository_upload "
29+ expect_succ pulp ansible repository create --name " cli_test_ansible_content_repository_upload "
30+ expect_succ pulp ansible content upload --file " ansible-posix-1.3.0.tar.gz" --repository " cli_test_ansible_content_repository_upload "
3231expect_succ pulp artifact list --sha256 " $sha256 "
3332test " $( echo " $OUTPUT " | jq -r length) " -eq " 1"
3433expect_succ pulp ansible content list --name " posix" --namespace " ansible" --version " 1.3.0"
3534test " $( echo " $OUTPUT " | jq -r length) " -eq " 1"
3635content_href=" $( echo " $OUTPUT " | jq -r .[0].pulp_href) "
3736expect_succ pulp ansible content show --href " $content_href "
38- expect_succ pulp ansible repository content list --repository " cli_test_ansible_repository_upload " --version 1
37+ expect_succ pulp ansible repository content list --repository " cli_test_ansible_content_repository_upload " --version 1
3938test " $( echo " $OUTPUT " | jq -r length) " -eq " 1"
4039
4140# Test ansible role upload
5756 tar --extract --file=" ansible-posix-1.3.0.tar.gz" " MANIFEST.json"
5857 collection_path=" $( realpath ' MANIFEST.json' ) "
5958 signature_path=" $( " $( dirname " $( dirname " $( dirname " $( realpath " $0 " ) " ) " ) " ) " /assets/sign_detached.sh " $collection_path " | jq -r .signature) "
60- expect_succ pulp ansible content --type " signature" upload --file " $signature_path " --collection " $content_href " --repository " cli_test_ansible_repository_verify "
59+ expect_succ pulp ansible content --type " signature" upload --file " $signature_path " --collection " $content_href " --repository " cli_test_ansible_content_repository_verify "
6160 expect_succ pulp ansible content --type " signature" list --collection " $content_href " --pubkey-fingerprint " 0C1A894EBB86AFAE218424CADDEF3019C2D4A8CF"
6261 test " $( echo " $OUTPUT " | jq -r length) " -eq " 1"
6362 content3_href=" $( echo " $OUTPUT " | jq -r .[0].pulp_href) "
6463 expect_succ pulp ansible content --type " signature" show --href " $content3_href "
6564fi
6665
6766# New content commands
68- expect_succ pulp ansible repository create --name " cli_test_ansible_repository "
69- expect_succ pulp ansible repository content add --repository " cli_test_ansible_repository " --name " posix" --namespace " ansible" --version " 1.3.0"
70- expect_succ pulp ansible repository content list --repository " cli_test_ansible_repository " --version 1
67+ expect_succ pulp ansible repository create --name " cli_test_ansible_content_repository "
68+ expect_succ pulp ansible repository content add --repository " cli_test_ansible_content_repository " --name " posix" --namespace " ansible" --version " 1.3.0"
69+ expect_succ pulp ansible repository content list --repository " cli_test_ansible_content_repository " --version 1
7170test " $( echo " $OUTPUT " | jq -r length) " -eq " 1"
72- expect_succ pulp ansible repository content --type " role" add --repository " cli_test_ansible_repository " --name " kubernetes-modules" --namespace " ansible" --version " 0.0.1"
73- expect_succ pulp ansible repository content --type " role" list --repository " cli_test_ansible_repository " --version 2
71+ expect_succ pulp ansible repository content --type " role" add --repository " cli_test_ansible_content_repository " --name " kubernetes-modules" --namespace " ansible" --version " 0.0.1"
72+ expect_succ pulp ansible repository content --type " role" list --repository " cli_test_ansible_content_repository " --version 2
7473test " $( echo " $OUTPUT " | jq -r length) " -eq " 1"
7574
7675if pulp debug has-plugin --name " core" --specifier " >=3.11.0"
7776then
78- expect_succ pulp ansible repository content list --repository " cli_test_ansible_repository " --version 2 --all-types
77+ expect_succ pulp ansible repository content list --repository " cli_test_ansible_content_repository " --version 2 --all-types
7978 test " $( echo " $OUTPUT " | jq -r length) " -eq " 2"
8079fi
8180
82- expect_succ pulp ansible repository content remove --repository " cli_test_ansible_repository " --href " $content_href "
83- expect_succ pulp ansible repository content remove --repository " cli_test_ansible_repository " --href " $content2_href "
84- expect_succ pulp ansible repository content list --repository " cli_test_ansible_repository "
81+ expect_succ pulp ansible repository content remove --repository " cli_test_ansible_content_repository " --href " $content_href "
82+ expect_succ pulp ansible repository content remove --repository " cli_test_ansible_content_repository " --href " $content2_href "
83+ expect_succ pulp ansible repository content list --repository " cli_test_ansible_content_repository "
8584test " $( echo " $OUTPUT " | jq -r length) " -eq " 0"
0 commit comments