diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/ansible-galaxy-collection-scm/tasks/multi_collection_repo_all.yml | |
parent | Initial commit. (diff) | |
download | ansible-core-upstream/2.14.3.tar.xz ansible-core-upstream/2.14.3.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | test/integration/targets/ansible-galaxy-collection-scm/tasks/multi_collection_repo_all.yml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-galaxy-collection-scm/tasks/multi_collection_repo_all.yml b/test/integration/targets/ansible-galaxy-collection-scm/tasks/multi_collection_repo_all.yml new file mode 100644 index 0000000..f22f984 --- /dev/null +++ b/test/integration/targets/ansible-galaxy-collection-scm/tasks/multi_collection_repo_all.yml @@ -0,0 +1,45 @@ +- name: Install all collections by default + command: 'ansible-galaxy collection install git+file://{{ test_repo_path }}/.git' + +- name: list installed collections + command: 'ansible-galaxy collection list' + register: installed_collections + +- assert: + that: + - "'ansible_test.collection_1' in installed_collections.stdout" + - "'ansible_test.collection_2' in installed_collections.stdout" + +- name: install from artifact to another path to compare contents + command: 'ansible-galaxy collection install {{ artifact_path }} -p {{ alt_install_path }} --no-deps' + vars: + artifact_path: "{{ galaxy_dir }}/ansible_test-collection_1-1.0.0.tar.gz" + +- name: check if the files and folders in build_ignore were respected + stat: + path: "{{ install_path }}/ansible_test/collection_1/{{ item }}" + register: result + loop: + - foo.txt + - foobar/baz.txt + - foobar/qux + +- assert: + that: result.results | map(attribute='stat') | map(attribute='exists') is not any + +- name: check that directory with ignored files exists and is empty + stat: + path: "{{ install_path }}/ansible_test/collection_1/foobar" + register: result + +- assert: + that: result.stat.exists + +- name: test that there are no diff installing from a repo vs artifact + command: "diff -ur {{ collection_from_artifact }} {{ collection_from_repo }} -x *.json" + vars: + collection_from_repo: "{{ install_path }}/ansible_test/collection_1" + collection_from_artifact: "{{ alt_install_path }}/ansible_test/collection_1" + +- include_tasks: ./empty_installed_collections.yml + when: cleanup |