From 794b39338643979653e6785e09b47c0ebf6fccbd Mon Sep 17 00:00:00 2001 From: Kirill Zaitsev Date: Wed, 14 Dec 2016 15:34:48 +0300 Subject: [PATCH] Allow running abao from tox Simply run tox -e abao to test raml files against fake api. --- .gitignore | 3 +++ .travis.yml | 1 + test-requirements.txt | 2 ++ tox.ini | 9 +++++++++ 4 files changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index 4846fba..5a43171 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,6 @@ ENV/ # Rope project settings .ropeproject + +# abao tests run gunicorn in tox, this file is used to track it's pid and kill after run +.gunicorn.pid diff --git a/.travis.yml b/.travis.yml index d7c51a6..2437fde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: - TOXENV=py27 - TOXENV=py33 - TOXENV=py34 + - TOXENV=abao script: - tox diff --git a/test-requirements.txt b/test-requirements.txt index ec5db9c..3ed0974 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,3 +13,5 @@ ddt>=1.0.1 mock>=2.0 testtools>=1.4.0 + +nodeenv>=0.9.4 # BSD License # BSD diff --git a/tox.ini b/tox.ini index 83e3b1b..7cbb879 100644 --- a/tox.ini +++ b/tox.ini @@ -37,6 +37,15 @@ basepython = python3.4 [testenv:py35] basepython = python3.5 +[testenv:abao] +deps = -r{toxinidir}/test-requirements.txt +passenv = * +commands = nodeenv -p + npm install -dd -g abao@0.5.0 + gunicorn -w 1 -b 0.0.0.0:5000 ceagle.main:app -D -p .gunicorn.pid + abao raml/api.raml --server http://127.0.0.1:5000 --hookfiles raml/abao_hooks.js + sh -c \'kill -9 `cat .gunicorn.pid`\' + [testenv:venv] commands = {posargs}