[tox] skipsdist = True envlist=ansible-lint,ansible-syntax,flake8,dashboards [testenv] basepython=python2 [testenv:ansible-lint] install_command = pip install --upgrade {opts} {packages} deps= ansible-lint commands=ansible-lint -x ANSIBLE0010,ANSIBLE0012,ANSIBLE0017,701 ansible/playbook.yml [testenv:ansible-syntax] install_command = pip install --upgrade {opts} {packages} deps= ansible changedir=ansible commands= ansible-playbook -i '127.0.0.1,' playbook.yml --syntax-check -vv [testenv:flake8] install_command = pip install --upgrade {opts} {packages} deps= flake8 commands=flake8 --select=F,E9 {posargs:cephmetrics.py dashUpdater.py collectors tests} # Integration tests must operate against a live deployment. To run, simply: # tox -e integration /path/to/inventory # NOTE: A current limitation of these tests is that they assume that defaults # were used for things like ports, usernames, etc. They do, however, # support devel_mode=True/False. [testenv:integration] install_command = pip install --upgrade {opts} {packages} deps= ansible pytest pytest-xdist testinfra changedir=ansible commands= py.test -v -n auto --connection=ansible --ansible-inventory {posargs} ./roles/ [testenv:dashboards] install_command = pip install --upgrade {opts} {packages} deps= pytest changedir=dashboards commands= py.test -v ./