mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 07:04:45 -03:30
ad_hoc_command_cancel really can no longer timeout on a cancel (it happens sub second) and remove unneeded block Modified all test to respect test_id parameter so that all tests can be run togeather as a single ID Fix a check in group since its group2 is deleted from being a sub group of group1 The UI now allows to propage sub groups to the inventory which we may want to support within the collection Only run instance integration test if we are running on k8s and assume we are not by default Fix hard coded names in manual_project
94 lines
2.3 KiB
YAML
94 lines
2.3 KiB
YAML
---
|
|
- name: Generate a test id
|
|
set_fact:
|
|
test_id: "{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
|
when: test_id is not defined
|
|
|
|
- name: Generate names
|
|
set_fact:
|
|
app1_name: "AWX-Collection-tests-application-app1-{{ test_id }}"
|
|
app2_name: "AWX-Collection-tests-application-app2-{{ test_id }}"
|
|
app3_name: "AWX-Collection-tests-application-app3-{{ test_id }}"
|
|
|
|
- block:
|
|
- name: Create an application
|
|
application:
|
|
name: "{{ app1_name }}"
|
|
authorization_grant_type: "password"
|
|
client_type: "public"
|
|
organization: "Default"
|
|
state: present
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result is changed"
|
|
|
|
- name: Delete our application
|
|
application:
|
|
name: "{{ app1_name }}"
|
|
organization: "Default"
|
|
state: absent
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result is changed"
|
|
|
|
- name: Create a second application
|
|
application:
|
|
name: "{{ app2_name }}"
|
|
authorization_grant_type: "authorization-code"
|
|
client_type: "confidential"
|
|
organization: "Default"
|
|
description: "Another application"
|
|
redirect_uris:
|
|
- http://tower.com/api/v2/
|
|
- http://tower.com/api/v2/teams
|
|
state: present
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result is changed"
|
|
|
|
- name: Create an all trusting application
|
|
application:
|
|
name: "{{ app3_name }}"
|
|
organization: "Default"
|
|
description: "All Trusting Application"
|
|
skip_authorization: true
|
|
authorization_grant_type: "password"
|
|
client_type: "confidential"
|
|
state: present
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- "result is changed"
|
|
|
|
- name: Rename an inventory
|
|
application:
|
|
name: "{{ app3_name }}"
|
|
new_name: "{{ app3_name }}a"
|
|
organization: Default
|
|
state: present
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- result.changed
|
|
|
|
always:
|
|
- name: Delete our application
|
|
application:
|
|
name: "{{ item }}"
|
|
organization: "Default"
|
|
state: absent
|
|
register: result
|
|
loop:
|
|
- "{{ app1_name }}"
|
|
- "{{ app2_name }}"
|
|
- "{{ app3_name }}"
|
|
- "{{ app3_name }}a"
|