mirror of
https://github.com/ansible/ansible
synced 2026-06-19 07:35:52 +00:00
tests: test for collection_skeleton_ignore (#86896)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
This commit is contained in:
@@ -116,6 +116,14 @@
|
||||
loop:
|
||||
- inventory/foo.py
|
||||
- galaxy.yml
|
||||
- CLAUDE.md
|
||||
|
||||
- name: create a valid skeleton ignore expression in ansible.cfg
|
||||
copy:
|
||||
content: |
|
||||
[galaxy]
|
||||
collection_skeleton_ignore=^\./CLAUDE.md$
|
||||
dest: "{{ galaxy_dir }}/scratch/skeleton/ansible.cfg"
|
||||
|
||||
- name: create symlinks
|
||||
file:
|
||||
@@ -151,6 +159,7 @@
|
||||
- galaxy.yml
|
||||
- plugins/inventory/foo.py
|
||||
- README
|
||||
- CLAUDE.md
|
||||
|
||||
- assert:
|
||||
that:
|
||||
@@ -159,6 +168,7 @@
|
||||
- stat_result.results[2].stat.islnk
|
||||
- stat_result.results[3].stat.isreg
|
||||
- stat_result.results[4].stat.isreg
|
||||
- not stat_result.results[5].stat.exists
|
||||
|
||||
- name: Verify the README was templated successfully
|
||||
copy:
|
||||
|
||||
@@ -708,13 +708,13 @@
|
||||
|
||||
# test --ignore-signature-status-code passed multiple times
|
||||
- name: reinstall collections with only one valid signature by ignoring the other errors
|
||||
command: ansible-galaxy install -r {{ req_file }} {{ cli_opts }} {{ galaxy_verbosity }} {{ ignore_errors }}
|
||||
command: ansible-galaxy install -r {{ req_file }} {{ cli_opts }} {{ galaxy_verbosity }} {{ ignore_flags }}
|
||||
register: install_req
|
||||
vars:
|
||||
req_file: "{{ galaxy_dir }}/ansible_collections/requirements.yaml"
|
||||
cli_opts: "-s {{ test_name }} --keyring {{ keyring }} --force"
|
||||
keyring: "{{ gpg_homedir }}/pubring.kbx"
|
||||
ignore_errors: "--ignore-signature-status-code BADSIG --ignore-signature-status-code FAILURE"
|
||||
ignore_flags: "--ignore-signature-status-code BADSIG --ignore-signature-status-code FAILURE"
|
||||
environment:
|
||||
ANSIBLE_COLLECTIONS_PATH: '{{ galaxy_dir }}/ansible_collections'
|
||||
ANSIBLE_GALAXY_REQUIRED_VALID_SIGNATURE_COUNT: all
|
||||
@@ -735,13 +735,13 @@
|
||||
|
||||
# test --ignore-signature-status-code passed once with a list
|
||||
- name: reinstall collections with only one valid signature by ignoring the other errors
|
||||
command: ansible-galaxy install -r {{ req_file }} {{ cli_opts }} {{ galaxy_verbosity }} {{ ignore_errors }}
|
||||
command: ansible-galaxy install -r {{ req_file }} {{ cli_opts }} {{ galaxy_verbosity }} {{ ignore_flags }}
|
||||
register: install_req
|
||||
vars:
|
||||
req_file: "{{ galaxy_dir }}/ansible_collections/requirements.yaml"
|
||||
cli_opts: "-s {{ test_name }} --keyring {{ keyring }} --force"
|
||||
keyring: "{{ gpg_homedir }}/pubring.kbx"
|
||||
ignore_errors: "--ignore-signature-status-codes BADSIG FAILURE"
|
||||
ignore_flags: "--ignore-signature-status-codes BADSIG FAILURE"
|
||||
environment:
|
||||
ANSIBLE_COLLECTIONS_PATH: '{{ galaxy_dir }}/ansible_collections'
|
||||
ANSIBLE_GALAXY_REQUIRED_VALID_SIGNATURE_COUNT: all
|
||||
|
||||
Reference in New Issue
Block a user