Debian Codegraph @

ansible_collections/community/general/tests/unit/plugins/modules/test_gconftool2.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 {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
8 test_cases:
9 - id: test_simple_element_set
10 input:
11 state: present
12 key: /desktop/gnome/background/picture_filename
13 value: 200
14 value_type: int
15 output:
16 new_value: '200'
17 changed: true
18 version: 3.2.6
19 mocks:
20 run_command:
21 - command: [/testbin/gconftool-2, --version]
22 environ: *env-def
23 rc: 0
24 out: "3.2.6\n"
25 err: ''
26 - command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
27 environ: *env-def
28 rc: 0
29 out: "100\n"
30 err: ''
31 - command: [/testbin/gconftool-2, --type, int, --set, /desktop/gnome/background/picture_filename, '200']
32 environ: *env-def
33 rc: 0
34 out: ''
35 err: ''
36 - command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
37 environ: *env-def
38 rc: 0
39 out: "200\n"
40 err: ''
41 - id: test_simple_element_set_idempotency_int
42 input:
43 state: present
44 key: /desktop/gnome/background/picture_filename
45 value: 200
46 value_type: int
47 output:
48 new_value: '200'
49 changed: false
50 version: 3.2.5
51 mocks:
52 run_command:
53 - command: [/testbin/gconftool-2, --version]
54 environ: *env-def
55 rc: 0
56 out: "3.2.5\n"
57 err: ''
58 - command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
59 environ: *env-def
60 rc: 0
61 out: "200\n"
62 err: ''
63 - command: [/testbin/gconftool-2, --type, int, --set, /desktop/gnome/background/picture_filename, '200']
64 environ: *env-def
65 rc: 0
66 out: ''
67 err: ''
68 - command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
69 environ: *env-def
70 rc: 0
71 out: "200\n"
72 err: ''
73 - id: test_simple_element_set_idempotency_bool
74 input:
75 state: present
76 key: /apps/gnome_settings_daemon/screensaver/start_screensaver
77 value: false
78 value_type: bool
79 output:
80 new_value: 'false'
81 changed: false
82 version: 3.2.4
83 mocks:
84 run_command:
85 - command: [/testbin/gconftool-2, --version]
86 environ: *env-def
87 rc: 0
88 out: "3.2.4\n"
89 err: ''
90 - command: [/testbin/gconftool-2, --get, /apps/gnome_settings_daemon/screensaver/start_screensaver]
91 environ: *env-def
92 rc: 0
93 out: "false\n"
94 err: ''
95 - command: [/testbin/gconftool-2, --type, bool, --set, /apps/gnome_settings_daemon/screensaver/start_screensaver, 'False']
96 environ: *env-def
97 rc: 0
98 out: ''
99 err: ''
100 - command: [/testbin/gconftool-2, --get, /apps/gnome_settings_daemon/screensaver/start_screensaver]
101 environ: *env-def
102 rc: 0
103 out: "false\n"
104 err: ''
105 - id: test_simple_element_unset
106 input:
107 state: absent
108 key: /desktop/gnome/background/picture_filename
109 output:
110 new_value:
111 changed: true
112 mocks:
113 run_command:
114 - command: [/testbin/gconftool-2, --version]
115 environ: *env-def
116 rc: 0
117 out: "3.2.4\n"
118 err: ''
119 - command: [/testbin/gconftool-2, --get, /desktop/gnome/background/picture_filename]
120 environ: *env-def
121 rc: 0
122 out: "200\n"
123 err: ''
124 - command: [/testbin/gconftool-2, --unset, /desktop/gnome/background/picture_filename]
125 environ: *env-def
126 rc: 0
127 out: ''
128 err: ''
129 - id: test_simple_element_unset_idempotency
130 input:
131 state: absent
132 key: /apps/gnome_settings_daemon/screensaver/start_screensaver
133 output:
134 new_value:
135 changed: false
136 mocks:
137 run_command:
138 - command: [/testbin/gconftool-2, --version]
139 environ: *env-def
140 rc: 0
141 out: "3.2.4\n"
142 err: ''
143 - command: [/testbin/gconftool-2, --get, /apps/gnome_settings_daemon/screensaver/start_screensaver]
144 environ: *env-def
145 rc: 0
146 out: ''
147 err: ''
148 - command: [/testbin/gconftool-2, --unset, /apps/gnome_settings_daemon/screensaver/start_screensaver]
149 environ: *env-def
150 rc: 0
151 out: ''
152 err: ''