Răsfoiți Sursa

More travis fixes and debugging

Nuwan Goonasekera 7 ani în urmă
părinte
comite
7700603107
3 a modificat fișierele cu 11 adăugiri și 13 ștergeri
  1. 4 6
      .travis.yml
  2. 5 7
      cloudbridge/cloud/providers/aws/provider.py
  3. 2 0
      tox.ini

+ 4 - 6
.travis.yml

@@ -27,20 +27,18 @@ matrix:
     env: TOX_ENV=py36-gce
   - python: 3.6
     env: TOX_ENV=py36-openstack
-  - python: pypy-6.0
+  - python: pypy-5.4
     env: TOX_ENV=pypy-aws
-  - python: pypy-6.0
+  - python: pypy-5.4
     env: TOX_ENV=pypy-azure
-  - python: pypy-6.0
+  - python: pypy-5.4
     env: TOX_ENV=pypy-gce
-  - python: pypy-6.0
+  - python: pypy-5.4
     env: TOX_ENV=pypy-openstack
 env:
   global:
     - PYTHONUNBUFFERED=True
     - COVERALLS_PARALLEL=true
-    # https://github.com/travis-ci/travis-ci/issues/7940
-    - BOTO_CONFIG=/dev/null
 before_install:
     - openssl aes-256-cbc -K $encrypted_b3fcf6d0737c_key -iv $encrypted_b3fcf6d0737c_iv
             -in credentials.tar.gz.enc -out credentials.tar.gz -d

+ 5 - 7
cloudbridge/cloud/providers/aws/provider.py

@@ -3,13 +3,11 @@ import logging as log
 
 import boto3
 
-try:
-    # These are installed only for the case of a dev instance
-    import responses
-    from moto import mock_ec2
-    from moto import mock_s3
-except ImportError:
-    log.debug('[aws provider] moto library not available!')
+# These are installed only for the case of a dev instance
+from moto import mock_ec2
+from moto import mock_s3
+
+import responses
 
 from cloudbridge.cloud.base import BaseCloudProvider
 from cloudbridge.cloud.base.helpers import get_env

+ 2 - 0
tox.ini

@@ -20,6 +20,8 @@ commands = flake8 cloudbridge test setup.py
            nosetests -v --nocapture --nologcapture --logging-format='%(asctime)s [%(levelname)s] %(name)s: %(message)s' {posargs}
 setenv =
     MOTO_AMIS_PATH=./test/fixtures/custom_amis.json
+    # Fix for moto import issue: https://github.com/travis-ci/travis-ci/issues/7940
+    BOTO_CONFIG=/dev/null
     aws: CB_TEST_PROVIDER=aws
     azure: CB_TEST_PROVIDER=azure
     gce: CB_TEST_PROVIDER=gce