Sfoglia il codice sorgente

Merge branch 'master' of github.com:gvlproject/cloudbridge

Enis Afgan 10 anni fa
parent
commit
5f6769fbad
4 ha cambiato i file con 16 aggiunte e 15 eliminazioni
  1. 2 2
      .travis.yml
  2. 1 0
      requirements.txt
  3. 12 12
      test/test_provider_compute_service.py
  4. 1 1
      tox.ini

+ 2 - 2
.travis.yml

@@ -1,11 +1,11 @@
 language: python
-python: 3.5
+python: 3.4
 os:
   - linux
 #  - osx
 env:
   - TOX_ENV=py27
-  - TOX_ENV=py35
+  - TOX_ENV=py34
   - TOX_ENV=pypy
 matrix:
   fast_finish: true

+ 1 - 0
requirements.txt

@@ -1,2 +1,3 @@
 -e ".[full]"
+httpretty==0.8.6
 git+git://github.com/spulec/moto.git@1d58aae42a7ea10d1617428970f6f5d55a76fc80

+ 12 - 12
test/test_provider_compute_service.py

@@ -132,7 +132,7 @@ class ProviderComputeServiceTestCase(ProviderTestBase):
             is_root=True,
             source=img,
             # TODO: This should be greater than the ami size or tests will fail
-            # on actual infrastructures. Needs an image.size method
+            # on actual infrastructure. Needs an image.size method
             size=2,
             delete_on_terminate=True)
 
@@ -142,19 +142,19 @@ class ProviderComputeServiceTestCase(ProviderTestBase):
             lc.add_volume_device(size=1, is_root=True)
 
         # Add all available ephemeral devices
-#         instance_type_name = helpers.get_provider_test_data(
-#             self.provider,
-#             "instance_type")
-#         inst_type = next(self.provider.compute.instance_types.find(
-#             name=instance_type_name))
-#         for _ in range(inst_type.num_ephemeral_disks):
-#             lc.add_ephemeral_device()
+        instance_type_name = helpers.get_provider_test_data(
+            self.provider,
+            "instance_type")
+        inst_type = next(self.provider.compute.instance_types.find(
+            name=instance_type_name))
+        for _ in range(inst_type.num_ephemeral_disks):
+            lc.add_ephemeral_device()
 
         # block_devices should be populated
-#         self.assertTrue(
-#             len(lc.block_devices) == 2 + inst_type.num_ephemeral_disks,
-#             "Expected %d total block devices bit found %d" %
-#             (2 + inst_type.num_ephemeral_disks, len(lc.block_devices)))
+        self.assertTrue(
+            len(lc.block_devices) == 2 + inst_type.num_ephemeral_disks,
+            "Expected %d total block devices bit found %d" %
+            (2 + inst_type.num_ephemeral_disks, len(lc.block_devices)))
 
         inst = helpers.create_test_instance(
             self.provider,

+ 1 - 1
tox.ini

@@ -4,7 +4,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py27, py35, pypy
+envlist = py27, py34, pypy
 
 [testenv]
 commands = {envpython} -m coverage run --branch --source=cloudbridge --omit=cloudbridge/cloud/interfaces/* setup.py test