Debian Codegraph @

ansible_collections/community/general/tests/unit/plugins/modules/test_facter_facts.yaml

raw
1 # Copyright (c) Alexei Znamensky ([email protected])
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 ---
6 anchors:
7 environ: &env-def {check_rc: true}
8 test_cases:
9 - id: simple run
10 output:
11 ansible_facts:
12 facter:
13 a: 1
14 b: 2
15 c: 3
16 mocks:
17 run_command:
18 - command: [/testbin/facter, --json]
19 environ: *env-def
20 rc: 0
21 out: >
22 { "a": 1, "b": 2, "c": 3 }
23 err: ''
24 - id: with args
25 input:
26 arguments:
27 - -p
28 - system_uptime
29 - timezone
30 - is_virtual
31 output:
32 ansible_facts:
33 facter:
34 a: 1
35 b: 2
36 c: 3
37 mocks:
38 run_command:
39 - command: [/testbin/facter, --json, -p, system_uptime, timezone, is_virtual]
40 environ: *env-def
41 rc: 0
42 out: >
43 { "a": 1, "b": 2, "c": 3 }
44 err: ''