1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 13:55:31 +03:00

Remove tower_receive and tower_send tests

This commit is contained in:
Caleb Boylan 2020-04-21 13:46:13 -07:00
parent 0aaa2d8c8d
commit 5eea4e8881
2 changed files with 0 additions and 99 deletions

View File

@ -1,18 +0,0 @@
---
- name: Export all Tower assets
tower_receive:
all: true
register: result
- assert:
that:
- "result is successful"
- name: Extract names from output
set_fact:
object_names: "{{ result.assets | map(attribute='name') | list }}"
- assert:
that:
- "result is successful"
- "'Default' in object_names"

View File

@ -1,81 +0,0 @@
---
- name: Test no parameters
tower_send:
register: result
ignore_errors: true
- assert:
that:
- "result is failed"
- name: Create user json
set_fact:
user:
- username: "jowestco"
first_name: "John"
last_name: "Westcott"
asset_type: "user"
email: "john.westcott.iv@redhat.com"
- name: Test a new import of asset
tower_send:
assets: "{{ user | to_json() }}"
register: result
- assert:
that:
- "result is changed"
- name: Test an existing import of asset
tower_send:
assets: "{{ user | to_json() }}"
register: result
- assert:
that:
- "result is successful"
- "result is not changed"
- name: Change an existing asset
tower_send:
assets: "{{ user | combine({'last_name': 'Westcott IV'}) | to_json() }}"
register: result
- assert:
that:
- "result is changed"
- name: Ensure the organization is not created
tower_organization:
name: "Red Hat"
state: absent
- name: Create organization json
set_fact:
organization:
- asset_type: organization
name: "Red Hat"
- name: Create temp file
tempfile:
state: file
register: my_temp_file
- name: Drop down a file to import
copy:
dest: "{{ my_temp_file.path }}"
content: "{{ organization | to_nice_json() }}"
- name: Create org via files
tower_send:
files: "{{ my_temp_file.path }}"
register: result
- assert:
that:
- "result is changed"
- name: Remove Temp File
file:
path: "{{ my_temp_file.path }}"
state: absent