tox.ini 1.6 KB

123456789101112131415161718192021222324252627282930313233
  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. # see setup.cfg for options sent to nosetests and coverage
  18. nosetests -v --nocapture --nologcapture --logging-format='%(asctime)s [%(levelname)s] %(name)s: %(message)s' {posargs}
  19. setenv =
  20. MOTO_AMIS_PATH=./test/fixtures/custom_amis.json
  21. aws: CB_TEST_PROVIDER=aws
  22. azure: CB_TEST_PROVIDER=azure
  23. openstack: CB_TEST_PROVIDER=openstack
  24. passenv =
  25. CB_USE_MOCK_PROVIDERS PYTHONUNBUFFERED
  26. aws: CB_IMAGE_AWS CB_INSTANCE_TYPE_AWS CB_PLACEMENT_AWS AWS_ACCESS_KEY AWS_SECRET_KEY
  27. 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
  28. 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
  29. deps =
  30. -rrequirements.txt
  31. coverage