summaryrefslogtreecommitdiff
path: root/test/integration/targets/ansible-galaxy-collection
diff options
context:
space:
mode:
authorSloane Hertel <19572925+s-hertel@users.noreply.github.com>2022-02-28 16:15:10 -0500
committerGitHub <noreply@github.com>2022-02-28 16:15:10 -0500
commit7657caa072828164684d5e70724c34df2a9cb5a8 (patch)
tree5e0f638b16a65e85552bd3134688c6009e3cc8c5 /test/integration/targets/ansible-galaxy-collection
parent0d4219f2655e78406cee4be298cec584626a9aba (diff)
downloadansible-7657caa072828164684d5e70724c34df2a9cb5a8.tar.gz
Fix 'ansible-galaxy collection verify' to display new files/dirs (#76690)
* Fix 'ansible-galaxy collection verify' to report files/directories not listed in the FILES.json * changelog * Fix bug in 2.13+
Diffstat (limited to 'test/integration/targets/ansible-galaxy-collection')
-rw-r--r--test/integration/targets/ansible-galaxy-collection/tasks/verify.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-galaxy-collection/tasks/verify.yml b/test/integration/targets/ansible-galaxy-collection/tasks/verify.yml
index 309e56ef20..ad5b1e2f31 100644
--- a/test/integration/targets/ansible-galaxy-collection/tasks/verify.yml
+++ b/test/integration/targets/ansible-galaxy-collection/tasks/verify.yml
@@ -251,6 +251,16 @@
- name: append a newline to a module to modify the checksum
shell: "echo '' >> {{ module_path }}"
+- name: create a new module file
+ file:
+ path: '{{ galaxy_dir }}/ansible_collections/ansible_test/verify/plugins/modules/test_new_file.py'
+ state: touch
+
+- name: create a new directory
+ file:
+ path: '{{ galaxy_dir }}/ansible_collections/ansible_test/verify/plugins/modules/test_new_dir'
+ state: directory
+
- name: verify modified collection locally-only (should fail)
command: ansible-galaxy collection verify --offline ansible_test.verify
register: verify
@@ -261,6 +271,8 @@
- verify.rc != 0
- "'Collection ansible_test.verify contains modified content in the following files:' in verify.stdout"
- "'plugins/modules/test_module.py' in verify.stdout"
+ - "'plugins/modules/test_new_file.py' in verify.stdout"
+ - "'plugins/modules/test_new_dir' in verify.stdout"
# TODO: add a test for offline Galaxy signature metadata