Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Commit

Permalink
integrated AWX tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Mar 13, 2018
1 parent 9e57e0b commit d5ed137
Show file tree
Hide file tree
Showing 7 changed files with 1,234 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ setup_v1.py
tower_cli_v2/
bin/tower-cli-v2
setup_v2.py

# for AWX install
/awx
.cache/
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ python:
matrix:
allow_failures:
- python: nightly
before_install:
- ./install_awx.sh
install:
- pip install -r requirements_dev.txt
before_script:
flake8 .
script:
- flake8 tower-cli/ tests/
- tox
- py.test tests_awx/
after_success:
coveralls
10 changes: 10 additions & 0 deletions install_awx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rm -rf awx/
git clone https://github.com/ansible/awx.git awx --depth=1
cp tests_awx/CLI_settings.py awx/awx/settings/CLI_settings.py
cd awx
pip install -r requirements/requirements.txt
pip install -r requirements/requirements_dev.txt
python setup.py install
cd ..
# have to add awx dir to path
[[ ":$PYTHONPATH:" != *":$PWD/awx:"* ]] && PYTHONPATH="${PYTHONPATH}:$PWD/awx"
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
DJANGO_SETTINGS_MODULE = awx.settings.CLI_settings
python_files = *.py
addopts = --reuse-db --nomigrations --tb=native
Loading

0 comments on commit d5ed137

Please sign in to comment.