Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/iso_extract/tasks/tests.yml

raw
1 ---
2 # Test code for the iso_extract module.
3 # Copyright (c) 2017, James Tanner <[email protected]>
4 # Copyright (c) 2017, Dag Wieers <[email protected]>
5 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
6 # SPDX-License-Identifier: GPL-3.0-or-later
7
8 - name: Extract the iso
9 iso_extract:
10 image: '{{ output_test_dir }}/test.iso'
11 dest: '{{ output_test_dir }}'
12 files:
13 - 1.txt
14 - 2.txt
15 register: iso_extract_test0
16
17 - assert:
18 that:
19 - iso_extract_test0 is changed
20
21 - name: Extract the iso again
22 iso_extract:
23 image: '{{ output_test_dir }}/test.iso'
24 dest: '{{ output_test_dir }}'
25 files:
26 - 1.txt
27 - 2.txt
28 register: iso_extract_test0_again
29
30 - name: Test iso_extract_test0_again (normal mode)
31 assert:
32 that:
33 - iso_extract_test0_again is not changed
34 when: not in_check_mode
35
36 - name: Test iso_extract_test0_again (check-mode)
37 assert:
38 that:
39 - iso_extract_test0_again is changed
40 when: in_check_mode
41
42 - name: Extract the iso using files with leading slash
43 iso_extract:
44 image: '{{ output_test_dir }}/test.iso'
45 dest: '{{ output_test_dir }}'
46 files:
47 - /1.txt
48 - /2.txt
49 force: true
50 register: iso_extract_leading_slash
51
52 - name: Test iso_extract with leading slash succeeds (normal mode)
53 assert:
54 that:
55 - iso_extract_leading_slash is not failed
56 when: not in_check_mode