tox.ini 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. # Tox (http://tox.testrun.org/) is a tool for running tests
  2. # in multiple virtualenvs. This configuration file will run the
  3. # test suite on all supported python versions and providers.
  4. # To use it, "pip install tox" and then run "tox" from this directory.
  5. # You will have to set all required environment variables (below) before
  6. # running the tests.
  7. #
  8. # Alternatively, to run mock tests only, run tox as follows:
  9. # CB_USE_MOCK_PROVIDERS=True tox -e py27-aws
  10. #
  11. # Simply running tox -e py27-aws also works because the default is to use
  12. # mock providers.
  13. [tox]
  14. envlist = {py27,py36,pypy}-{aws,azure,openstack}
  15. [testenv]
  16. commands = flake8 cloudbridge test setup.py
  17. {envpython} -m coverage run --branch --source=cloudbridge --omit=cloudbridge/cloud/interfaces/* setup.py test {posargs}
  18. setenv =
  19. MOTO_AMIS_PATH=./test/fixtures/custom_amis.json
  20. aws: CB_TEST_PROVIDER=aws
  21. azure: CB_TEST_PROVIDER=azure
  22. openstack: CB_TEST_PROVIDER=openstack
  23. passenv =
  24. CB_USE_MOCK_PROVIDERS
  25. aws: CB_IMAGE_AWS CB_INSTANCE_TYPE_AWS CB_PLACEMENT_AWS AWS_ACCESS_KEY AWS_SECRET_KEY
  26. azure: AZURE_SUBSCRIPTION_ID AZURE_CLIENT_ID AZURE_SECRET AZURE_TENANT AZURE_REGION_NAME AZURE_RESOURCE_GROUP AZURE_STORAGE_ACCOUNT AZURE_VM_DEFAULT_USER_NAME AZURE_PUBLIC_KEY_STORAGE_TABLE_NAME
  27. openstack: CB_IMAGE_OS CB_INSTANCE_TYPE_OS CB_PLACEMENT_OS OS_AUTH_URL OS_PASSWORD OS_PROJECT_NAME OS_TENANT_NAME OS_USERNAME OS_REGION_NAME OS_USER_DOMAIN_NAME OS_PROJECT_DOMAIN_NAME NOVA_SERVICE_NAME
  28. deps =
  29. -rrequirements.txt
  30. coverage