From 9dfed16daefa908e64fd0ca2f353a4b48dfdfaf1 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Tue, 2 Jun 2026 08:26:04 -0700 Subject: [PATCH] tests: test for collection_skeleton_ignore (#86896) Signed-off-by: Abhijeet Kasurde --- .../targets/ansible-galaxy-collection/tasks/init.yml | 10 ++++++++++ .../ansible-galaxy-collection/tasks/install.yml | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/test/integration/targets/ansible-galaxy-collection/tasks/init.yml b/test/integration/targets/ansible-galaxy-collection/tasks/init.yml index 3f01d3080c4..d24c77127f1 100644 --- a/test/integration/targets/ansible-galaxy-collection/tasks/init.yml +++ b/test/integration/targets/ansible-galaxy-collection/tasks/init.yml @@ -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: diff --git a/test/integration/targets/ansible-galaxy-collection/tasks/install.yml b/test/integration/targets/ansible-galaxy-collection/tasks/install.yml index a60862837c1..c1054fbbcf9 100644 --- a/test/integration/targets/ansible-galaxy-collection/tasks/install.yml +++ b/test/integration/targets/ansible-galaxy-collection/tasks/install.yml @@ -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