Skip to content

Commit 794b393

Browse files
committed
Allow running abao from tox
Simply run tox -e abao to test raml files against fake api.
1 parent b81830c commit 794b393

4 files changed

Lines changed: 15 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,6 @@ ENV/
8989

9090
# Rope project settings
9191
.ropeproject
92+
93+
# abao tests run gunicorn in tox, this file is used to track it's pid and kill after run
94+
.gunicorn.pid

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ env:
88
- TOXENV=py27
99
- TOXENV=py33
1010
- TOXENV=py34
11+
- TOXENV=abao
1112

1213
script:
1314
- tox

test-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ ddt>=1.0.1
1313
mock>=2.0
1414

1515
testtools>=1.4.0
16+
17+
nodeenv>=0.9.4 # BSD License # BSD

tox.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ basepython = python3.4
3737
[testenv:py35]
3838
basepython = python3.5
3939

40+
[testenv:abao]
41+
deps = -r{toxinidir}/test-requirements.txt
42+
passenv = *
43+
commands = nodeenv -p
44+
npm install -dd -g abao@0.5.0
45+
gunicorn -w 1 -b 0.0.0.0:5000 ceagle.main:app -D -p .gunicorn.pid
46+
abao raml/api.raml --server http://127.0.0.1:5000 --hookfiles raml/abao_hooks.js
47+
sh -c \'kill -9 `cat .gunicorn.pid`\'
48+
4049
[testenv:venv]
4150
commands = {posargs}
4251

0 commit comments

Comments
 (0)