|
|
|
@ -108,7 +108,7 @@ popd # ${galaxy_testdir}
|
|
|
|
rm -fr "${galaxy_testdir}"
|
|
|
|
rm -fr "${galaxy_testdir}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Galaxy role list test case
|
|
|
|
# Galaxy role list tests
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Basic tests to ensure listing roles works
|
|
|
|
# Basic tests to ensure listing roles works
|
|
|
|
|
|
|
|
|
|
|
|
@ -121,6 +121,33 @@ f_ansible_galaxy_status \
|
|
|
|
[[ $(grep -c '^- test-role' out.txt ) -eq 2 ]]
|
|
|
|
[[ $(grep -c '^- test-role' out.txt ) -eq 2 ]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Properly list roles when the role name is a subset of the path, or the role
|
|
|
|
|
|
|
|
# name is the same name as the parent directory of the role. Issue #67365
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# ./parrot/parrot
|
|
|
|
|
|
|
|
# ./parrot/arr
|
|
|
|
|
|
|
|
# ./testing-roles/test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f_ansible_galaxy_status \
|
|
|
|
|
|
|
|
"list roles where the role name is the same or a subset of the role path (#67365)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
role_testdir=$(mktemp -d)
|
|
|
|
|
|
|
|
pushd "${role_testdir}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mkdir parrot
|
|
|
|
|
|
|
|
ansible-galaxy role init --init-path ./parrot parrot
|
|
|
|
|
|
|
|
ansible-galaxy role init --init-path ./parrot parrot-ship
|
|
|
|
|
|
|
|
ansible-galaxy role init --init-path ./parrot arr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ansible-galaxy role list -p ./parrot | tee out.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[[ $(grep -Ec '\- (parrot|arr)' out.txt) -eq 3 ]]
|
|
|
|
|
|
|
|
ansible-galaxy role list test-role | tee -a out.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
popd # ${role_testdir}
|
|
|
|
|
|
|
|
rm -rf "${role_testdir}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#################################
|
|
|
|
#################################
|
|
|
|
# ansible-galaxy collection tests
|
|
|
|
# ansible-galaxy collection tests
|
|
|
|
#################################
|
|
|
|
#################################
|
|
|
|
|