mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 18:37:39 -02:30
Remove project_manual integration test
This test can no longer be performed without manual intervention because of how jobs are now run in EEs
This commit is contained in:
@@ -1,71 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Load the UI settings
|
|
||||||
set_fact:
|
|
||||||
project_base_dir: "{{ controller_settings.project_base_dir }}"
|
|
||||||
inv_name: "AWX-Collection-tests-manual_project-inv-{{ test_id }}"
|
|
||||||
host_name: "AWX-Collection-tests-manual_project-host-{{ test_id }}"
|
|
||||||
cred_name: "AWX-Collection-tests-manual_project-cred-{{ test_id }}"
|
|
||||||
vars:
|
|
||||||
controller_settings: "{{ lookup('awx.awx.controller_api', 'config/') }}"
|
|
||||||
|
|
||||||
- inventory:
|
|
||||||
name: "{{ inv_name }}"
|
|
||||||
organization: Default
|
|
||||||
|
|
||||||
- host:
|
|
||||||
name: "{{ host_name }}"
|
|
||||||
inventory: "{{ inv_name }}"
|
|
||||||
variables:
|
|
||||||
ansible_connection: local
|
|
||||||
|
|
||||||
- name: Create an unused SSH / Machine credential
|
|
||||||
credential:
|
|
||||||
name: "{{ cred_name }}"
|
|
||||||
credential_type: Machine
|
|
||||||
inputs:
|
|
||||||
ssh_key_data: |
|
|
||||||
-----BEGIN EC PRIVATE KEY-----
|
|
||||||
MHcCAQEEIIUl6R1xgzR6siIUArz4XBPtGZ09aetma2eWf1v3uYymoAoGCCqGSM49
|
|
||||||
AwEHoUQDQgAENJNjgeZDAh/+BY860s0yqrLDprXJflY0GvHIr7lX3ieCtrzOMCVU
|
|
||||||
QWzw35pc5tvuP34SSi0ZE1E+7cVMDDOF3w==
|
|
||||||
-----END EC PRIVATE KEY-----
|
|
||||||
organization: Default
|
|
||||||
|
|
||||||
- block:
|
|
||||||
- name: Add a path to a setting
|
|
||||||
settings:
|
|
||||||
name: AWX_ISOLATION_SHOW_PATHS
|
|
||||||
value: "[{{ project_base_dir }}]"
|
|
||||||
|
|
||||||
- name: Create a directory for manual project
|
|
||||||
ad_hoc_command:
|
|
||||||
credential: "{{ cred_name }}"
|
|
||||||
inventory: "{{ inv_name }}"
|
|
||||||
job_type: run
|
|
||||||
module_args: "mkdir -p {{ project_base_dir }}/{{ project_dir_name }}"
|
|
||||||
module_name: command
|
|
||||||
wait: true
|
|
||||||
|
|
||||||
always:
|
|
||||||
- name: Delete path from setting
|
|
||||||
settings:
|
|
||||||
name: AWX_ISOLATION_SHOW_PATHS
|
|
||||||
value: []
|
|
||||||
|
|
||||||
- name: Delete dummy credential
|
|
||||||
credential:
|
|
||||||
name: "{{ cred_name }}"
|
|
||||||
credential_type: Machine
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Delete host
|
|
||||||
host:
|
|
||||||
name: "{{ host_name }}"
|
|
||||||
inventory: "{{ inv_name }}"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Delete Inventory
|
|
||||||
inventory:
|
|
||||||
name: "{{ inv_name }}"
|
|
||||||
organization: Default
|
|
||||||
state: absent
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
---
|
|
||||||
- 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 object names
|
|
||||||
set_fact:
|
|
||||||
project_name: "AWX-Collection-tests-manual_project-proj-{{ test_id }}"
|
|
||||||
project_dir_name: "proj_{{ test_id }}"
|
|
||||||
|
|
||||||
- name: Create a project directory for manual project
|
|
||||||
import_tasks: create_project_dir.yml
|
|
||||||
|
|
||||||
- name: Create a manual project
|
|
||||||
project:
|
|
||||||
name: "{{ project_name }}"
|
|
||||||
organization: Default
|
|
||||||
scm_type: manual
|
|
||||||
local_path: "{{ project_dir_name }}"
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- assert:
|
|
||||||
that:
|
|
||||||
- "result is changed"
|
|
||||||
|
|
||||||
- name: Delete a manual project
|
|
||||||
project:
|
|
||||||
name: "{{ project_name }}"
|
|
||||||
organization: Default
|
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- assert:
|
|
||||||
that:
|
|
||||||
- "result is changed"
|
|
||||||
Reference in New Issue
Block a user