tox.ini 1.8 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. [tox]
  8. envlist = {py27,py36,pypy}-{aws,azure,gcp,openstack,mock}
  9. [testenv]
  10. commands = flake8 cloudbridge test setup.py
  11. # see setup.cfg for options sent to nosetests and coverage
  12. nosetests -v --nocapture --nologcapture --logging-format='%(asctime)s [%(levelname)s] %(name)s: %(message)s' {posargs}
  13. setenv =
  14. MOTO_AMIS_PATH=./test/fixtures/custom_amis.json
  15. # Fix for moto import issue: https://github.com/travis-ci/travis-ci/issues/7940
  16. BOTO_CONFIG=/dev/null
  17. aws: CB_TEST_PROVIDER=aws
  18. azure: CB_TEST_PROVIDER=azure
  19. gcp: CB_TEST_PROVIDER=gcp
  20. openstack: CB_TEST_PROVIDER=openstack
  21. mock: CB_TEST_PROVIDER=mock
  22. passenv =
  23. PYTHONUNBUFFERED
  24. aws: CB_IMAGE_AWS CB_INSTANCE_TYPE_AWS CB_PLACEMENT_AWS AWS_ACCESS_KEY AWS_SECRET_KEY
  25. 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
  26. gcp: CB_IMAGE_GCP CB_INSTANCE_TYPE_GCP CB_PLACEMENT_GCP GCP_DEFAULT_REGION GCP_DEFAULT_ZONE GCP_PROJECT_NAME GCP_SERVICE_CREDS_FILE GCP_SERVICE_CREDS_DICT
  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. mock: CB_IMAGE_AWS CB_INSTANCE_TYPE_AWS CB_PLACEMENT_AWS AWS_ACCESS_KEY AWS_SECRET_KEY
  29. deps =
  30. -rrequirements.txt
  31. coverage