mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 06:17:36 -02:30
add test coverage
This commit is contained in:
@@ -178,6 +178,60 @@
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Delete an SSH credential
|
||||
credential:
|
||||
name: "{{ ssh_cred_name2 }}"
|
||||
organization: Default
|
||||
state: absent
|
||||
credential_type: Machine
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Ensure existence of SSH credential
|
||||
credential:
|
||||
name: "{{ ssh_cred_name2 }}"
|
||||
organization: Default
|
||||
state: exists
|
||||
credential_type: Machine
|
||||
description: An example SSH awx.awx.credential
|
||||
inputs:
|
||||
username: joe
|
||||
password: secret
|
||||
become_method: sudo
|
||||
become_username: superuser
|
||||
become_password: supersecret
|
||||
ssh_key_data: "{{ ssh_key_data }}"
|
||||
ssh_key_unlock: "passphrase"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Ensure existence of SSH credential, not updating any inputs
|
||||
credential:
|
||||
name: "{{ ssh_cred_name2 }}"
|
||||
organization: Default
|
||||
state: exists
|
||||
credential_type: Machine
|
||||
description: An example SSH awx.awx.credential
|
||||
inputs:
|
||||
username: joe
|
||||
password: no-update-secret
|
||||
become_method: sudo
|
||||
become_username: some-other-superuser
|
||||
become_password: some-other-secret
|
||||
ssh_key_data: "{{ ssh_key_data }}"
|
||||
ssh_key_unlock: "another-pass-phrase"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result is not changed
|
||||
|
||||
- name: Create an invalid SSH credential (passphrase required)
|
||||
credential:
|
||||
name: SSH Credential
|
||||
|
||||
Reference in New Issue
Block a user