tox.ini 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637
  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,gce,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. # Fix for moto import issue: https://github.com/travis-ci/travis-ci/issues/7940
  22. BOTO_CONFIG=/dev/null
  23. aws: CB_TEST_PROVIDER=aws
  24. azure: CB_TEST_PROVIDER=azure
  25. gce: CB_TEST_PROVIDER=gce
  26. openstack: CB_TEST_PROVIDER=openstack
  27. passenv =
  28. CB_USE_MOCK_PROVIDERS PYTHONUNBUFFERED
  29. aws: CB_IMAGE_AWS CB_INSTANCE_TYPE_AWS CB_PLACEMENT_AWS AWS_ACCESS_KEY AWS_SECRET_KEY
  30. 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
  31. gce: CB_IMAGE_GCE CB_INSTANCE_TYPE_GCE CB_PLACEMENT_GCE GCE_DEFAULT_REGION GCE_DEFAULT_ZONE GCE_PROJECT_NAME GCE_SERVICE_CREDS_FILE GCE_SERVICE_CREDS_DICT
  32. 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
  33. deps =
  34. -rrequirements.txt
  35. coverage