Kaynağa Gözat

Fix test names and number of processes

- Reduced the number of processes, when running tests, from 5 to 4 so that we
  run at most 4 tests in parallel and create at most 4 test networks in parallel
  which is the default limit on GCP.

- Some test resource names still use underscores; changed them to use dashes,
  instead.

- The Ubuntu image name is changed.

Test stats after this CL
========================
Ran 58 tests in 1173.289s

FAILED (SKIP=1, errors=27, failures=7)
Ehsan Chiniforooshan 8 yıl önce
ebeveyn
işleme
5b95f3fc21

+ 1 - 1
setup.cfg

@@ -8,7 +8,7 @@ omit =
 with-coverage=1
 cover-branches=1
 cover-package=cloudbridge
-processes=5
+processes=4
 process-timeout=2700
 match=^[Tt]est 
 # Don't capture stdout - print immediately

+ 2 - 2
test/helpers/__init__.py

@@ -91,7 +91,7 @@ TEST_DATA_CONFIG = {
         "placement": os.environ.get('CB_PLACEMENT_OS', 'zone-r1'),
     },
     'GCECloudProvider': {
-        'image': 'ubuntu-1404-trusty-v20171101',
+        'image': 'ubuntu-1604-lts',
         'vm_type': 'n1-standard-1',
         'placement': os.environ.get('GCE_DEFAULT_ZONE', 'us-central1-a'),
     },
@@ -149,7 +149,7 @@ def get_test_gateway(provider, name):
 
     This includes creating a network for the gateway, which is also returned.
     """
-    net_name = 'cb_testgwnet-{0}'.format(get_uuid())
+    net_name = 'cb-testgwnet-{0}'.format(get_uuid())
     net = provider.networking.networks.create(
         name=net_name, cidr_block='10.0.0.0/16')
     return net, net.gateways.get_or_create_inet_gateway(name)

+ 1 - 1
test/test_network_service.py

@@ -120,7 +120,7 @@ class CloudNetworkServiceTestCase(ProviderTestBase):
     def test_floating_ip_properties(self):
         # Check floating IP address
         net, gw = helpers.get_test_gateway(
-            self.provider, 'cb_crudfipgw-{0}'.format(helpers.get_uuid()))
+            self.provider, 'cb-crudfipgw-{0}'.format(helpers.get_uuid()))
         fip = gw.floating_ips.create()
         with helpers.cleanup_action(
                 lambda: helpers.delete_test_gateway(net, gw)):

+ 1 - 1
test/test_security_service.py

@@ -48,7 +48,7 @@ class CloudSecurityServiceTestCase(ProviderTestBase):
 
     @helpers.skipIfNoService(['security.key_pairs'])
     def test_import_key_pair(self):
-        name = 'cb_kpimport-{0}'.format(helpers.get_uuid())
+        name = 'cb-kpimport-{0}'.format(helpers.get_uuid())
 
         public_key, _ = cb_helpers.generate_key_pair()
         kp = self.provider.security.key_pairs.create(