mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Update manual project Collection integration test to be compatible with EEs
This commit is contained in:
@@ -272,7 +272,7 @@ class TowerAPIModule(TowerModule):
|
|||||||
if self._COLLECTION_TYPE not in self.collection_to_version or self.collection_to_version[self._COLLECTION_TYPE] != tower_type:
|
if self._COLLECTION_TYPE not in self.collection_to_version or self.collection_to_version[self._COLLECTION_TYPE] != tower_type:
|
||||||
self.warn("You are using the {0} version of this collection but connecting to {1}".format(self._COLLECTION_TYPE, tower_type))
|
self.warn("You are using the {0} version of this collection but connecting to {1}".format(self._COLLECTION_TYPE, tower_type))
|
||||||
elif collection_compare_ver != tower_compare_ver:
|
elif collection_compare_ver != tower_compare_ver:
|
||||||
self.warn("You are running collection version {0} but connecting to tower version {1}".format(self._COLLECTION_VERSION, tower_version))
|
self.warn("You are running collection version {0} but connecting to {2} version {1}".format(self._COLLECTION_VERSION, tower_version, tower_type))
|
||||||
|
|
||||||
self.version_checked = True
|
self.version_checked = True
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
---
|
---
|
||||||
- name: Fetch project_base_dir
|
- name: Load the UI settings
|
||||||
uri:
|
set_fact:
|
||||||
url: "{{ host.stdout }}/api/v2/config/"
|
project_base_dir: "{{ tower_settings.project_base_dir }}"
|
||||||
user: "{{ username.stdout }}"
|
vars:
|
||||||
password: "{{ password.stdout }}"
|
tower_settings: "{{ lookup('awx.awx.tower_api', 'config/') }}"
|
||||||
validate_certs: false
|
|
||||||
return_content: true
|
|
||||||
force_basic_auth: true
|
|
||||||
register: awx_config
|
|
||||||
|
|
||||||
- tower_inventory:
|
- tower_inventory:
|
||||||
name: localhost
|
name: localhost
|
||||||
@@ -31,16 +27,29 @@
|
|||||||
-----END EC PRIVATE KEY-----
|
-----END EC PRIVATE KEY-----
|
||||||
organization: Default
|
organization: Default
|
||||||
|
|
||||||
- name: Disable process isolation
|
|
||||||
command: awx-cli setting modify AWX_PROOT_ENABLED false
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
- name: Add a path to a setting
|
||||||
|
tower_settings:
|
||||||
|
name: AWX_ISOLATION_SHOW_PATHS
|
||||||
|
value: "[{{ project_base_dir }}]"
|
||||||
|
|
||||||
- name: Create a directory for manual project
|
- name: Create a directory for manual project
|
||||||
vars:
|
tower_ad_hoc_command:
|
||||||
project_base_dir: "{{ awx_config.json.project_base_dir }}"
|
credential: dummy
|
||||||
command: awx-cli ad_hoc launch --wait --inventory localhost
|
inventory: localhost
|
||||||
--credential dummy --module-name command
|
job_type: run
|
||||||
--module-args "mkdir -p {{ project_base_dir }}/{{ project_dir_name }}"
|
module_args: "mkdir -p {{ project_base_dir }}/{{ project_dir_name }}"
|
||||||
|
module_name: command
|
||||||
|
wait: True
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: enable process isolation
|
- name: Delete path from setting
|
||||||
command: awx-cli setting modify AWX_PROOT_ENABLED true
|
tower_settings:
|
||||||
|
name: AWX_ISOLATION_SHOW_PATHS
|
||||||
|
value: []
|
||||||
|
|
||||||
|
- name: Delete dummy credential
|
||||||
|
tower_credential:
|
||||||
|
name: dummy
|
||||||
|
kind: ssh
|
||||||
|
state: absent
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ py.test awx_collection/test/awx/
|
|||||||
|
|
||||||
## Running Integration Tests
|
## Running Integration Tests
|
||||||
|
|
||||||
The integration tests require a virtualenv with `ansible` >= 2.9 and `tower_cli`.
|
The integration tests require a virtualenv with `ansible` >= 2.9 and `awxkit`.
|
||||||
The collection must first be installed, which can be done using `make install_collection`.
|
The collection must first be installed, which can be done using `make install_collection`.
|
||||||
You also need a configuration file, as described in the running section.
|
You also need a configuration file, as described in the running section.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user