Adjust YAML files (#10233)

Adjust YAML files.
This commit is contained in:
Felix Fontein 2025-06-15 09:13:16 +02:00 committed by GitHub
commit eaa5e07b28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
247 changed files with 7318 additions and 7375 deletions

View file

@ -3,31 +3,31 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml.orig
- name: Setup test fixture
copy:
src: fixtures/ansible-xml-beers.xml
dest: /tmp/ansible-xml-beers.xml.orig
- name: Remove spaces from test fixture
shell: sed 's/^[ ]*//g' < /tmp/ansible-xml-beers.xml.orig > /tmp/ansible-xml-beers.xml
- name: Remove spaces from test fixture
shell: sed 's/^[ ]*//g' < /tmp/ansible-xml-beers.xml.orig > /tmp/ansible-xml-beers.xml
- name: Pretty print without modification
xml:
path: /tmp/ansible-xml-beers.xml
pretty_print: true
register: pretty_print_only
- name: Pretty print without modification
xml:
path: /tmp/ansible-xml-beers.xml
pretty_print: true
register: pretty_print_only
- name: Compare to expected result
copy:
src: results/test-pretty-print-only.xml
dest: /tmp/ansible-xml-beers.xml
check_mode: true
diff: true
register: comparison
- name: Compare to expected result
copy:
src: results/test-pretty-print-only.xml
dest: /tmp/ansible-xml-beers.xml
check_mode: true
diff: true
register: comparison
- name: Test expected result
assert:
that:
- name: Test expected result
assert:
that:
- pretty_print_only is changed
- comparison is not changed # identical
#command: diff -u {{ role_path }}/results/test-pretty-print-only.xml /tmp/ansible-xml-beers.xml
# command: diff -u {{ role_path }}/results/test-pretty-print-only.xml /tmp/ansible-xml-beers.xml