add test coverage

This commit is contained in:
matt
2023-03-23 15:44:00 -06:00
parent 7c4aedf716
commit b0c416334f
2 changed files with 71 additions and 0 deletions

View File

@@ -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