summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authormanas-init <70483021+manas-init@users.noreply.github.com>2021-02-25 00:52:24 +0100
committerGitHub <noreply@github.com>2021-02-25 00:52:24 +0100
commiteb72c36a71c8bf786d575a31246f602ad69cc9c9 (patch)
treec2efcb57955782fc4e8d1c86b81cedc39e5d9deb /test
parentcommented function (#73625) (diff)
downloadansible-eb72c36a71c8bf786d575a31246f602ad69cc9c9.tar.xz
ansible-eb72c36a71c8bf786d575a31246f602ad69cc9c9.zip
galaxy: Handle ignored directory names in role skeleton (#72035)
* galaxy: restore left hand slicing in assignment Fix 'ansible-galaxy role init --role-skeleton=role-skeleton' when the role skeleton contains an ignored directory. The issue was because the 'dirs' variable was changed to reference a different list, but needs to be mutated instead to stop os.walk from traversing ignored directories. Fixes: #71977 Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/targets/ansible-galaxy/runme.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-galaxy/runme.sh b/test/integration/targets/ansible-galaxy/runme.sh
index 165601cc62..1f2d56b311 100755
--- a/test/integration/targets/ansible-galaxy/runme.sh
+++ b/test/integration/targets/ansible-galaxy/runme.sh
@@ -324,6 +324,19 @@ pushd "${role_testdir}"
popd # ${role_testdir}
rm -rf "${role_testdir}"
+f_ansible_galaxy_status \
+ "Test if git hidden directories are skipped while using role skeleton (#71977)"
+
+role_testdir=$(mktemp -d)
+pushd "${role_testdir}"
+
+ ansible-galaxy role init sample-role-skeleton
+ git init ./sample-role-skeleton
+ ansible-galaxy role init --role-skeleton=sample-role-skeleton example
+
+popd # ${role_testdir}
+rm -rf "${role_testdir}"
+
#################################
# ansible-galaxy collection tests
#################################