diff options
author | Sloane Hertel <19572925+s-hertel@users.noreply.github.com> | 2022-02-28 16:15:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 16:15:10 -0500 |
commit | 7657caa072828164684d5e70724c34df2a9cb5a8 (patch) | |
tree | 5e0f638b16a65e85552bd3134688c6009e3cc8c5 /test/integration/targets/ansible-galaxy-collection | |
parent | 0d4219f2655e78406cee4be298cec584626a9aba (diff) | |
download | ansible-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.yml | 12 |
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 |