summaryrefslogtreecommitdiffstats
path: root/awx_collection/README.md
diff options
context:
space:
mode:
authorAlanCoding <arominge@redhat.com>2020-03-18 04:46:24 +0100
committerAlanCoding <arominge@redhat.com>2020-03-18 14:40:11 +0100
commitc054d7c3d7a229d09a1452fbf1ce9dbbb7a09e24 (patch)
tree4d0ed96b2d6de7bb62a035e40d13a54a78862bd8 /awx_collection/README.md
parentMerge pull request #6278 from AlanCoding/wfjt_tests (diff)
downloadawx-c054d7c3d7a229d09a1452fbf1ce9dbbb7a09e24.tar.xz
awx-c054d7c3d7a229d09a1452fbf1ce9dbbb7a09e24.zip
Automatically hack sys.path to make running tests easier
Diffstat (limited to 'awx_collection/README.md')
-rw-r--r--awx_collection/README.md28
1 files changed, 7 insertions, 21 deletions
diff --git a/awx_collection/README.md b/awx_collection/README.md
index 7c6108a3c4..8679c6b7d9 100644
--- a/awx_collection/README.md
+++ b/awx_collection/README.md
@@ -53,26 +53,11 @@ The following notes are changes that may require changes to playbooks:
## Running Unit Tests
-Tests to verify compatibility with the most recent AWX code are
-in `awx_collection/test/awx`. These tests require that Python packages
-are available for all of `awx`, `ansible`, `tower_cli`, and the collection
-itself.
+Tests to verify compatibility with the most recent AWX code are in `awx_collection/test/awx`.
+These can be ran by `make test_collection` in the development container.
-### Inside Development Container
-
-The target `make prepare_collection_venv` will prepare some requirements
-in the `awx_collection_test_venv` folder so that `make test_collection` can
-be executed to actually run the tests. A single test can be run via:
-
-```
-make test_collection COLLECTION_TEST_DIRS=awx_collection/test/awx/test_organization.py
-```
-
-### Manually
-
-As a faster alternative (if you do not want to use the container), or to
-run against Ansible or `tower-cli` source, it is possible to set up a
-working environment yourself:
+To run outside of the development container, or to run against
+Ansible or `tower-cli` source, set up a working environment:
```
mkvirtualenv my_new_venv
@@ -80,11 +65,12 @@ mkvirtualenv my_new_venv
pip install -r requirements/requirements.txt -r requirements/requirements_dev.txt -r requirements/requirements_git.txt
make clean-api
pip install -e <path to your Ansible>
-pip install -e <path to your tower-cli>
pip install -e .
-PYTHONPATH=awx_collection:$PYTHONPATH py.test awx_collection/test/awx/
+py.test awx_collection/test/awx/
```
+If you do not install tower-cli, it will skip tests for modules that require it.
+
## Running Integration Tests
The integration tests require a virtualenv with `ansible` >= 2.9 and `tower_cli`.