mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-05 21:54:22 -07:00
[PR #9664/439da9e6 backport][stable-10] test helper unit tests: reformat YAML files (#9667)
test helper unit tests: reformat YAML files (#9664)
(cherry picked from commit 439da9e6da
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
faa913d566
commit
4d4e626f95
13 changed files with 1611 additions and 1611 deletions
|
@ -9,106 +9,106 @@ anchors:
|
|||
environ_data: &env-data {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true, data: cool_password}
|
||||
environ_norc: &env-norc {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: true}
|
||||
test_cases:
|
||||
- id: test_kinit_default
|
||||
input:
|
||||
state: present
|
||||
password: cool_password
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist]
|
||||
environ: *env-def
|
||||
rc: 1
|
||||
out: ""
|
||||
err: ""
|
||||
- command: [/testbin/kinit]
|
||||
environ: *env-data
|
||||
rc: 0
|
||||
out: ""
|
||||
err: ""
|
||||
- id: test_kinit_principal
|
||||
input:
|
||||
state: present
|
||||
password: cool_password
|
||||
principal: admin@IPA.TEST
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist, -l]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: ""
|
||||
err: ""
|
||||
- command: [/testbin/kinit, admin@IPA.TEST]
|
||||
environ: *env-data
|
||||
rc: 0
|
||||
out: ""
|
||||
err: ""
|
||||
- id: test_kdestroy_default
|
||||
input:
|
||||
state: absent
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: ""
|
||||
err: ""
|
||||
- command: [/testbin/kdestroy]
|
||||
environ: *env-norc
|
||||
rc: 0
|
||||
out: ""
|
||||
err: ""
|
||||
- id: test_kdestroy_principal
|
||||
input:
|
||||
state: absent
|
||||
principal: admin@IPA.TEST
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist, -l]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: "admin@IPA.TEST"
|
||||
err: ""
|
||||
- command: [/testbin/kdestroy, -p, admin@IPA.TEST]
|
||||
environ: *env-norc
|
||||
rc: 0
|
||||
out: ""
|
||||
err: ""
|
||||
- id: test_kdestroy_cache_name
|
||||
input:
|
||||
state: absent
|
||||
cache_name: KEYRING:persistent:0:0
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist, -l]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: "KEYRING:persistent:0:0"
|
||||
err: ""
|
||||
- command: [/testbin/kdestroy, -c, KEYRING:persistent:0:0]
|
||||
environ: *env-norc
|
||||
rc: 0
|
||||
out: ""
|
||||
err: ""
|
||||
- id: test_kdestroy_all
|
||||
input:
|
||||
state: absent
|
||||
kdestroy_all: true
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/kdestroy, -A]
|
||||
environ: *env-norc
|
||||
rc: 0
|
||||
out: ""
|
||||
err: ""
|
||||
- id: test_kinit_default
|
||||
input:
|
||||
state: present
|
||||
password: cool_password
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist]
|
||||
environ: *env-def
|
||||
rc: 1
|
||||
out: ''
|
||||
err: ''
|
||||
- command: [/testbin/kinit]
|
||||
environ: *env-data
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- id: test_kinit_principal
|
||||
input:
|
||||
state: present
|
||||
password: cool_password
|
||||
principal: admin@IPA.TEST
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist, -l]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- command: [/testbin/kinit, admin@IPA.TEST]
|
||||
environ: *env-data
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- id: test_kdestroy_default
|
||||
input:
|
||||
state: absent
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- command: [/testbin/kdestroy]
|
||||
environ: *env-norc
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- id: test_kdestroy_principal
|
||||
input:
|
||||
state: absent
|
||||
principal: admin@IPA.TEST
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist, -l]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: admin@IPA.TEST
|
||||
err: ''
|
||||
- command: [/testbin/kdestroy, -p, admin@IPA.TEST]
|
||||
environ: *env-norc
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- id: test_kdestroy_cache_name
|
||||
input:
|
||||
state: absent
|
||||
cache_name: KEYRING:persistent:0:0
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/klist, -l]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: KEYRING:persistent:0:0
|
||||
err: ''
|
||||
- command: [/testbin/kdestroy, -c, KEYRING:persistent:0:0]
|
||||
environ: *env-norc
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- id: test_kdestroy_all
|
||||
input:
|
||||
state: absent
|
||||
kdestroy_all: true
|
||||
output:
|
||||
changed: true
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/kdestroy, -A]
|
||||
environ: *env-norc
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue