| 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: false} |
| 8 |
test_cases: |
| 9 |
- id: puppet_agent_plain |
| 10 |
input: {} |
| 11 |
output: |
| 12 |
changed: false |
| 13 |
mocks: |
| 14 |
run_command: |
| 15 |
- command: [/testbin/puppet, config, print, agent_disabled_lockfile] |
| 16 |
environ: *env-def |
| 17 |
rc: 0 |
| 18 |
out: blah, anything |
| 19 |
err: '' |
| 20 |
- command: |
| 21 |
- /testbin/timeout |
| 22 |
- -s |
| 23 |
- '9' |
| 24 |
- 30m |
| 25 |
- /testbin/puppet |
| 26 |
- agent |
| 27 |
- --onetime |
| 28 |
- --no-daemonize |
| 29 |
- --no-usecacheonfailure |
| 30 |
- --no-splay |
| 31 |
- --detailed-exitcodes |
| 32 |
- --verbose |
| 33 |
- --color |
| 34 |
- '0' |
| 35 |
environ: *env-def |
| 36 |
rc: 0 |
| 37 |
out: '' |
| 38 |
err: '' |
| 39 |
- id: puppet_agent_certname |
| 40 |
input: |
| 41 |
certname: potatobox |
| 42 |
output: |
| 43 |
changed: false |
| 44 |
mocks: |
| 45 |
run_command: |
| 46 |
- command: [/testbin/puppet, config, print, agent_disabled_lockfile] |
| 47 |
environ: *env-def |
| 48 |
rc: 0 |
| 49 |
out: blah, anything |
| 50 |
err: '' |
| 51 |
- command: |
| 52 |
- /testbin/timeout |
| 53 |
- -s |
| 54 |
- '9' |
| 55 |
- 30m |
| 56 |
- /testbin/puppet |
| 57 |
- agent |
| 58 |
- --onetime |
| 59 |
- --no-daemonize |
| 60 |
- --no-usecacheonfailure |
| 61 |
- --no-splay |
| 62 |
- --detailed-exitcodes |
| 63 |
- --verbose |
| 64 |
- --color |
| 65 |
- '0' |
| 66 |
- --certname=potatobox |
| 67 |
environ: *env-def |
| 68 |
rc: 0 |
| 69 |
out: '' |
| 70 |
err: '' |
| 71 |
- id: puppet_agent_tags_abc |
| 72 |
input: |
| 73 |
tags: [a, b, c] |
| 74 |
output: |
| 75 |
changed: false |
| 76 |
mocks: |
| 77 |
run_command: |
| 78 |
- command: [/testbin/puppet, config, print, agent_disabled_lockfile] |
| 79 |
environ: *env-def |
| 80 |
rc: 0 |
| 81 |
out: blah, anything |
| 82 |
err: '' |
| 83 |
- command: |
| 84 |
- /testbin/timeout |
| 85 |
- -s |
| 86 |
- '9' |
| 87 |
- 30m |
| 88 |
- /testbin/puppet |
| 89 |
- agent |
| 90 |
- --onetime |
| 91 |
- --no-daemonize |
| 92 |
- --no-usecacheonfailure |
| 93 |
- --no-splay |
| 94 |
- --detailed-exitcodes |
| 95 |
- --verbose |
| 96 |
- --color |
| 97 |
- '0' |
| 98 |
- --tags |
| 99 |
- a,b,c |
| 100 |
environ: *env-def |
| 101 |
rc: 0 |
| 102 |
out: '' |
| 103 |
err: '' |
| 104 |
- id: puppet_agent_skip_tags_def |
| 105 |
input: |
| 106 |
skip_tags: [d, e, f] |
| 107 |
output: |
| 108 |
changed: false |
| 109 |
mocks: |
| 110 |
run_command: |
| 111 |
- command: [/testbin/puppet, config, print, agent_disabled_lockfile] |
| 112 |
environ: *env-def |
| 113 |
rc: 0 |
| 114 |
out: blah, anything |
| 115 |
err: '' |
| 116 |
- command: |
| 117 |
- /testbin/timeout |
| 118 |
- -s |
| 119 |
- '9' |
| 120 |
- 30m |
| 121 |
- /testbin/puppet |
| 122 |
- agent |
| 123 |
- --onetime |
| 124 |
- --no-daemonize |
| 125 |
- --no-usecacheonfailure |
| 126 |
- --no-splay |
| 127 |
- --detailed-exitcodes |
| 128 |
- --verbose |
| 129 |
- --color |
| 130 |
- '0' |
| 131 |
- --skip_tags |
| 132 |
- d,e,f |
| 133 |
environ: *env-def |
| 134 |
rc: 0 |
| 135 |
out: '' |
| 136 |
err: '' |
| 137 |
- id: puppet_agent_noop_false |
| 138 |
input: |
| 139 |
noop: false |
| 140 |
output: |
| 141 |
changed: false |
| 142 |
mocks: |
| 143 |
run_command: |
| 144 |
- command: [/testbin/puppet, config, print, agent_disabled_lockfile] |
| 145 |
environ: *env-def |
| 146 |
rc: 0 |
| 147 |
out: blah, anything |
| 148 |
err: '' |
| 149 |
- command: |
| 150 |
- /testbin/timeout |
| 151 |
- -s |
| 152 |
- '9' |
| 153 |
- 30m |
| 154 |
- /testbin/puppet |
| 155 |
- agent |
| 156 |
- --onetime |
| 157 |
- --no-daemonize |
| 158 |
- --no-usecacheonfailure |
| 159 |
- --no-splay |
| 160 |
- --detailed-exitcodes |
| 161 |
- --verbose |
| 162 |
- --color |
| 163 |
- '0' |
| 164 |
- --no-noop |
| 165 |
environ: *env-def |
| 166 |
rc: 0 |
| 167 |
out: '' |
| 168 |
err: '' |
| 169 |
- id: puppet_agent_noop_true |
| 170 |
input: |
| 171 |
noop: true |
| 172 |
output: |
| 173 |
changed: false |
| 174 |
mocks: |
| 175 |
run_command: |
| 176 |
- command: [/testbin/puppet, config, print, agent_disabled_lockfile] |
| 177 |
environ: *env-def |
| 178 |
rc: 0 |
| 179 |
out: blah, anything |
| 180 |
err: '' |
| 181 |
- command: |
| 182 |
- /testbin/timeout |
| 183 |
- -s |
| 184 |
- '9' |
| 185 |
- 30m |
| 186 |
- /testbin/puppet |
| 187 |
- agent |
| 188 |
- --onetime |
| 189 |
- --no-daemonize |
| 190 |
- --no-usecacheonfailure |
| 191 |
- --no-splay |
| 192 |
- --detailed-exitcodes |
| 193 |
- --verbose |
| 194 |
- --color |
| 195 |
- '0' |
| 196 |
- --noop |
| 197 |
environ: *env-def |
| 198 |
rc: 0 |
| 199 |
out: '' |
| 200 |
err: '' |
| 201 |
- id: puppet_agent_timeout_empty |
| 202 |
input: |
| 203 |
timeout: "" |
| 204 |
output: |
| 205 |
changed: false |
| 206 |
mocks: |
| 207 |
run_command: |
| 208 |
- command: [/testbin/puppet, config, print, agent_disabled_lockfile] |
| 209 |
environ: *env-def |
| 210 |
rc: 0 |
| 211 |
out: blah, anything |
| 212 |
err: '' |
| 213 |
- command: |
| 214 |
- /testbin/puppet |
| 215 |
- agent |
| 216 |
- --onetime |
| 217 |
- --no-daemonize |
| 218 |
- --no-usecacheonfailure |
| 219 |
- --no-splay |
| 220 |
- --detailed-exitcodes |
| 221 |
- --verbose |
| 222 |
- --color |
| 223 |
- '0' |
| 224 |
environ: *env-def |
| 225 |
rc: 0 |
| 226 |
out: '' |
| 227 |
err: '' |
| 228 |
- id: puppet_agent_waitforlock |
| 229 |
input: |
| 230 |
waitforlock: 30 |
| 231 |
output: |
| 232 |
changed: false |
| 233 |
mocks: |
| 234 |
run_command: |
| 235 |
- command: [/testbin/puppet, config, print, agent_disabled_lockfile] |
| 236 |
environ: *env-def |
| 237 |
rc: 0 |
| 238 |
out: blah, anything |
| 239 |
err: '' |
| 240 |
- command: |
| 241 |
- /testbin/timeout |
| 242 |
- -s |
| 243 |
- '9' |
| 244 |
- 30m |
| 245 |
- /testbin/puppet |
| 246 |
- agent |
| 247 |
- --onetime |
| 248 |
- --no-daemonize |
| 249 |
- --no-usecacheonfailure |
| 250 |
- --no-splay |
| 251 |
- --detailed-exitcodes |
| 252 |
- --verbose |
| 253 |
- --color |
| 254 |
- '0' |
| 255 |
- --waitforlock |
| 256 |
- '30' |
| 257 |
environ: *env-def |
| 258 |
rc: 0 |
| 259 |
out: '' |
| 260 |
err: '' |