mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 00:57:48 -02:30
Fixing test issue and 'modornizing' test
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
---
|
||||
- name: Generate a random string for test
|
||||
set_fact:
|
||||
test_id: "{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
when: test_id is not defined
|
||||
|
||||
- name: Generate names
|
||||
set_fact:
|
||||
src_cred_name: src_cred
|
||||
target_cred_name: target_cred
|
||||
src_cred_name: "AWX-Collection-tests-tower_credential_input_source-src_cred-{{ test_id }}"
|
||||
target_cred_name: "AWX-Collection-tests-tower_credential_input_source-target_cred-{{ test_id }}"
|
||||
|
||||
- block:
|
||||
- name: Add Tower credential Lookup
|
||||
tower_credential:
|
||||
description: Credential for Testing Source
|
||||
@@ -42,6 +48,7 @@
|
||||
object_query: "Safe=MY_SAFE;Object=AWX-user"
|
||||
object_query_format: "Exact"
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
@@ -69,6 +76,7 @@
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
always:
|
||||
- name: Remove a Tower credential source
|
||||
tower_credential_input_source:
|
||||
input_field_name: password
|
||||
|
||||
Reference in New Issue
Block a user