summaryrefslogtreecommitdiff
path: root/test/integration/targets/ansible-galaxy
diff options
context:
space:
mode:
authorSam Doran <sdoran@redhat.com>2020-02-14 19:51:48 -0500
committerGitHub <noreply@github.com>2020-02-14 19:51:48 -0500
commit7ae34cef157a5e4adfbbe1d2b7f4a1edeb6068a2 (patch)
tree8638116ea3adfc9b10c59812b646de9046bff1ac /test/integration/targets/ansible-galaxy
parent5ea26b6e5a4f99687003b842c0de631669259dd3 (diff)
downloadansible-7ae34cef157a5e4adfbbe1d2b7f4a1edeb6068a2.tar.gz
Fix role list regression (#67436)
Add the roles_path parent to the role_parser object, so paths are passed to the list function Add basic role list tests to prevent future regressions
Diffstat (limited to 'test/integration/targets/ansible-galaxy')
-rwxr-xr-xtest/integration/targets/ansible-galaxy/runme.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-galaxy/runme.sh b/test/integration/targets/ansible-galaxy/runme.sh
index 97b04234f6..7eff3fd6b7 100755
--- a/test/integration/targets/ansible-galaxy/runme.sh
+++ b/test/integration/targets/ansible-galaxy/runme.sh
@@ -107,6 +107,20 @@ EOF
popd # ${galaxy_testdir}
rm -fr "${galaxy_testdir}"
+
+# Galaxy role list test case
+#
+# Basic tests to ensure listing roles works
+
+f_ansible_galaxy_status \
+ "role list"
+
+ ansible-galaxy role list | tee out.txt
+ ansible-galaxy role list test-role | tee -a out.txt
+
+ [[ $(grep -c '^- test-role' out.txt ) -eq 2 ]]
+
+
#################################
# ansible-galaxy collection tests
#################################