Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/xml/tasks/test-count.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 - name: Setup test fixture
7 copy:
8 src: fixtures/ansible-xml-beers.xml
9 dest: /tmp/ansible-xml-beers.xml
10
11
12 - name: Add child element
13 xml:
14 path: /tmp/ansible-xml-beers.xml
15 xpath: /business/beers/beer
16 count: true
17 register: beers
18
19 - name: Test expected result
20 assert:
21 that:
22 - beers is not changed
23 - beers.count == 3