diff options
Diffstat (limited to 'tempest')
17 files changed, 55 insertions, 55 deletions
diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py index b5e969eaf..3a34a2e2e 100644 --- a/tempest/api/compute/admin/test_aggregates.py +++ b/tempest/api/compute/admin/test_aggregates.py @@ -37,8 +37,8 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest): @classmethod def resource_setup(cls): super(AggregatesAdminTestJSON, cls).resource_setup() - cls.aggregate_name_prefix = 'test_aggregate_' - cls.az_name_prefix = 'test_az_' + cls.aggregate_name_prefix = 'test_aggregate' + cls.az_name_prefix = 'test_az' hosts_all = cls.os_adm.hosts_client.list_hosts() hosts = map(lambda x: x['host_name'], @@ -215,7 +215,7 @@ class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest): self.addCleanup(self.client.delete_aggregate, aggregate['id']) self.client.add_host(aggregate['id'], self.host) self.addCleanup(self.client.remove_host, aggregate['id'], self.host) - server_name = data_utils.rand_name('test_server_') + server_name = data_utils.rand_name('test_server') admin_servers_client = self.os_adm.servers_client server = self.create_test_server(name=server_name, availability_zone=az_name, diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py index 07c8c4e8a..f6d6ad3f8 100644 --- a/tempest/api/compute/admin/test_aggregates_negative.py +++ b/tempest/api/compute/admin/test_aggregates_negative.py @@ -36,8 +36,8 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): @classmethod def resource_setup(cls): super(AggregatesAdminNegativeTestJSON, cls).resource_setup() - cls.aggregate_name_prefix = 'test_aggregate_' - cls.az_name_prefix = 'test_az_' + cls.aggregate_name_prefix = 'test_aggregate' + cls.az_name_prefix = 'test_az' hosts_all = cls.os_adm.hosts_client.list_hosts() hosts = map(lambda x: x['host_name'], @@ -134,7 +134,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): hosts_all = self.os_adm.hosts_client.list_hosts() hosts = map(lambda x: x['host_name'], hosts_all) while True: - non_exist_host = data_utils.rand_name('nonexist_host_') + non_exist_host = data_utils.rand_name('nonexist_host') if non_exist_host not in hosts: break @@ -189,7 +189,7 @@ class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): @test.attr(type=['negative', 'gate']) @test.idempotent_id('95d6a6fa-8da9-4426-84d0-eec0329f2e4d') def test_aggregate_remove_nonexistent_host(self): - non_exist_host = data_utils.rand_name('nonexist_host_') + non_exist_host = data_utils.rand_name('nonexist_host') aggregate_name = data_utils.rand_name(self.aggregate_name_prefix) aggregate = self.client.create_aggregate(name=aggregate_name) self.addCleanup(self.client.delete_aggregate, aggregate['id']) diff --git a/tempest/api/compute/admin/test_quotas.py b/tempest/api/compute/admin/test_quotas.py index bbd47b65a..7601b2546 100644 --- a/tempest/api/compute/admin/test_quotas.py +++ b/tempest/api/compute/admin/test_quotas.py @@ -101,7 +101,7 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest): @test.idempotent_id('ce9e0815-8091-4abd-8345-7fe5b85faa1d') def test_get_updated_quotas(self): # Verify that GET shows the updated quota set of tenant - tenant_name = data_utils.rand_name('cpu_quota_tenant_') + tenant_name = data_utils.rand_name('cpu_quota_tenant') tenant_desc = tenant_name + '-desc' identity_client = self.os_adm.identity_client tenant = identity_client.create_tenant(name=tenant_name, @@ -114,8 +114,8 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest): self.assertEqual(5120, quota_set['ram']) # Verify that GET shows the updated quota set of user - user_name = data_utils.rand_name('cpu_quota_user_') - password = data_utils.rand_name('password-') + user_name = data_utils.rand_name('cpu_quota_user') + password = data_utils.rand_name('password') email = user_name + '@testmail.tm' user = identity_client.create_user(name=user_name, password=password, @@ -135,7 +135,7 @@ class QuotasAdminTestJSON(base.BaseV2ComputeAdminTest): @test.idempotent_id('389d04f0-3a41-405f-9317-e5f86e3c44f0') def test_delete_quota(self): # Admin can delete the resource quota set for a tenant - tenant_name = data_utils.rand_name('ram_quota_tenant_') + tenant_name = data_utils.rand_name('ram_quota_tenant') tenant_desc = tenant_name + '-desc' identity_client = self.os_adm.identity_client tenant = identity_client.create_tenant(name=tenant_name, diff --git a/tempest/api/compute/admin/test_quotas_negative.py b/tempest/api/compute/admin/test_quotas_negative.py index caa329ed0..b74285d09 100644 --- a/tempest/api/compute/admin/test_quotas_negative.py +++ b/tempest/api/compute/admin/test_quotas_negative.py @@ -151,8 +151,8 @@ class QuotasAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): self.demo_tenant_id, security_group_rules=default_sg_rules_quota) - s_name = data_utils.rand_name('securitygroup-') - s_description = data_utils.rand_name('description-') + s_name = data_utils.rand_name('securitygroup') + s_description = data_utils.rand_name('description') securitygroup =\ self.sg_client.create_security_group(s_name, s_description) self.addCleanup(self.sg_client.delete_security_group, diff --git a/tempest/api/compute/admin/test_security_groups.py b/tempest/api/compute/admin/test_security_groups.py index 6d79a7747..95656e866 100644 --- a/tempest/api/compute/admin/test_security_groups.py +++ b/tempest/api/compute/admin/test_security_groups.py @@ -49,8 +49,8 @@ class SecurityGroupsTestAdminJSON(base.BaseV2ComputeAdminTest): security_group_list = [] # Create two security groups for a non-admin tenant for i in range(2): - name = data_utils.rand_name('securitygroup-') - description = data_utils.rand_name('description-') + name = data_utils.rand_name('securitygroup') + description = data_utils.rand_name('description') securitygroup = (self.client .create_security_group(name, description)) self.addCleanup(self._delete_security_group, @@ -60,8 +60,8 @@ class SecurityGroupsTestAdminJSON(base.BaseV2ComputeAdminTest): client_tenant_id = securitygroup['tenant_id'] # Create two security groups for admin tenant for i in range(2): - name = data_utils.rand_name('securitygroup-') - description = data_utils.rand_name('description-') + name = data_utils.rand_name('securitygroup') + description = data_utils.rand_name('description') adm_securitygroup = (self.adm_client .create_security_group(name, description)) diff --git a/tempest/api/compute/admin/test_servers_negative.py b/tempest/api/compute/admin/test_servers_negative.py index edcb05259..d7e62dfde 100644 --- a/tempest/api/compute/admin/test_servers_negative.py +++ b/tempest/api/compute/admin/test_servers_negative.py @@ -66,7 +66,7 @@ class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): def test_resize_server_using_overlimit_ram(self): # NOTE(mriedem): Avoid conflicts with os-quota-class-sets tests. self.useFixture(fixtures.LockFixture('compute_quotas')) - flavor_name = data_utils.rand_name("flavor-") + flavor_name = data_utils.rand_name("flavor") flavor_id = self._get_unused_flavor_id() quota_set = self.quotas_client.get_default_quota_set(self.tenant_id) ram = int(quota_set['ram']) + 1 @@ -88,7 +88,7 @@ class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest): def test_resize_server_using_overlimit_vcpus(self): # NOTE(mriedem): Avoid conflicts with os-quota-class-sets tests. self.useFixture(fixtures.LockFixture('compute_quotas')) - flavor_name = data_utils.rand_name("flavor-") + flavor_name = data_utils.rand_name("flavor") flavor_id = self._get_unused_flavor_id() ram = 512 quota_set = self.quotas_client.get_default_quota_set(self.tenant_id) diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py index ddfe6de4c..05bc9f887 100644 --- a/tempest/api/compute/base.py +++ b/tempest/api/compute/base.py @@ -247,7 +247,7 @@ class BaseComputeTest(tempest.test.BaseTestCase): if name is None: name = data_utils.rand_name(cls.__name__ + "-securitygroup") if description is None: - description = data_utils.rand_name('description-') + description = data_utils.rand_name('description') body = \ cls.security_groups_client.create_security_group(name, description) diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py index 53d0e95da..9591b3835 100644 --- a/tempest/api/compute/images/test_images.py +++ b/tempest/api/compute/images/test_images.py @@ -43,7 +43,7 @@ class ImagesTestJSON(base.BaseV2ComputeTest): @test.attr(type='gate') @test.idempotent_id('aa06b52b-2db5-4807-b218-9441f75d74e3') def test_delete_saving_image(self): - snapshot_name = data_utils.rand_name('test-snap-') + snapshot_name = data_utils.rand_name('test-snap') server = self.create_test_server(wait_until='ACTIVE') self.addCleanup(self.servers_client.delete_server, server['id']) image = self.create_image_from_server(server['id'], diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py index 10e468e18..ad502ad44 100644 --- a/tempest/api/compute/images/test_images_negative.py +++ b/tempest/api/compute/images/test_images_negative.py @@ -77,7 +77,7 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest): self.servers_client.wait_for_server_status(server['id'], 'SHUTOFF') self.addCleanup(self.servers_client.delete_server, server['id']) - snapshot_name = data_utils.rand_name('test-snap-') + snapshot_name = data_utils.rand_name('test-snap') image = self.create_image_from_server(server['id'], name=snapshot_name, wait_until='ACTIVE', @@ -89,7 +89,7 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('ec176029-73dc-4037-8d72-2e4ff60cf538') def test_create_image_specify_uuid_35_characters_or_less(self): # Return an error if Image ID passed is 35 characters or less - snapshot_name = data_utils.rand_name('test-snap-') + snapshot_name = data_utils.rand_name('test-snap') test_uuid = ('a' * 35) self.assertRaises(lib_exc.NotFound, self.client.create_image, test_uuid, snapshot_name) @@ -98,7 +98,7 @@ class ImagesNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('36741560-510e-4cc2-8641-55fe4dfb2437') def test_create_image_specify_uuid_37_characters_or_more(self): # Return an error if Image ID passed is 37 characters or more - snapshot_name = data_utils.rand_name('test-snap-') + snapshot_name = data_utils.rand_name('test-snap') test_uuid = ('a' * 37) self.assertRaises(lib_exc.NotFound, self.client.create_image, test_uuid, snapshot_name) diff --git a/tempest/api/compute/images/test_images_oneserver_negative.py b/tempest/api/compute/images/test_images_oneserver_negative.py index c75d1dc71..18ce2118b 100644 --- a/tempest/api/compute/images/test_images_oneserver_negative.py +++ b/tempest/api/compute/images/test_images_oneserver_negative.py @@ -84,7 +84,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('55d1d38c-dd66-4933-9c8e-7d92aeb60ddc') def test_create_image_specify_invalid_metadata(self): # Return an error when creating image with invalid metadata - snapshot_name = data_utils.rand_name('test-snap-') + snapshot_name = data_utils.rand_name('test-snap') meta = {'': ''} self.assertRaises(lib_exc.BadRequest, self.client.create_image, self.server_id, snapshot_name, meta) @@ -93,7 +93,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('3d24d11f-5366-4536-bd28-cff32b748eca') def test_create_image_specify_metadata_over_limits(self): # Return an error when creating image with meta data over 256 chars - snapshot_name = data_utils.rand_name('test-snap-') + snapshot_name = data_utils.rand_name('test-snap') meta = {'a' * 260: 'b' * 260} self.assertRaises(lib_exc.BadRequest, self.client.create_image, self.server_id, snapshot_name, meta) @@ -104,7 +104,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest): # Disallow creating another image when first image is being saved # Create first snapshot - snapshot_name = data_utils.rand_name('test-snap-') + snapshot_name = data_utils.rand_name('test-snap') body = self.client.create_image(self.server_id, snapshot_name) image_id = data_utils.parse_image_id(body.response['location']) @@ -112,7 +112,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest): self.addCleanup(self._reset_server) # Create second snapshot - alt_snapshot_name = data_utils.rand_name('test-snap-') + alt_snapshot_name = data_utils.rand_name('test-snap') self.assertRaises(lib_exc.Conflict, self.client.create_image, self.server_id, alt_snapshot_name) @@ -130,7 +130,7 @@ class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest): def test_delete_image_that_is_not_yet_active(self): # Return an error while trying to delete an image what is creating - snapshot_name = data_utils.rand_name('test-snap-') + snapshot_name = data_utils.rand_name('test-snap') body = self.client.create_image(self.server_id, snapshot_name) image_id = data_utils.parse_image_id(body.response['location']) self.image_ids.append(image_id) diff --git a/tempest/api/compute/keypairs/test_keypairs.py b/tempest/api/compute/keypairs/test_keypairs.py index 6e59601b2..20247d014 100644 --- a/tempest/api/compute/keypairs/test_keypairs.py +++ b/tempest/api/compute/keypairs/test_keypairs.py @@ -43,7 +43,7 @@ class KeyPairsV2TestJSON(base.BaseComputeTest): # Create 3 keypairs key_list = list() for i in range(3): - k_name = data_utils.rand_name('keypair-') + k_name = data_utils.rand_name('keypair') keypair = self._create_keypair(k_name) # Need to pop these keys so that our compare doesn't fail later, # as the keypair dicts from list API doesn't have them. @@ -69,7 +69,7 @@ class KeyPairsV2TestJSON(base.BaseComputeTest): @test.idempotent_id('6c1d3123-4519-4742-9194-622cb1714b7d') def test_keypair_create_delete(self): # Keypair should be created, verified and deleted - k_name = data_utils.rand_name('keypair-') + k_name = data_utils.rand_name('keypair') keypair = self._create_keypair(k_name) private_key = keypair['private_key'] key_name = keypair['name'] @@ -83,7 +83,7 @@ class KeyPairsV2TestJSON(base.BaseComputeTest): @test.idempotent_id('a4233d5d-52d8-47cc-9a25-e1864527e3df') def test_get_keypair_detail(self): # Keypair should be created, Got details by name and deleted - k_name = data_utils.rand_name('keypair-') + k_name = data_utils.rand_name('keypair') self._create_keypair(k_name) keypair_detail = self.client.get_keypair(k_name) self.assertIn('name', keypair_detail) @@ -99,7 +99,7 @@ class KeyPairsV2TestJSON(base.BaseComputeTest): @test.idempotent_id('39c90c6a-304a-49dd-95ec-2366129def05') def test_keypair_create_with_pub_key(self): # Keypair should be created with a given public key - k_name = data_utils.rand_name('keypair-') + k_name = data_utils.rand_name('keypair') pub_key = ("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs" "Ne3/1ILNCqFyfYWDeTKLD6jEXC2OQHLmietMWW+/vd" "aZq7KZEwO0jhglaFjU1mpqq4Gz5RX156sCTNM9vRbw" diff --git a/tempest/api/compute/keypairs/test_keypairs_negative.py b/tempest/api/compute/keypairs/test_keypairs_negative.py index 7a1a5e3f2..6aa0939e2 100644 --- a/tempest/api/compute/keypairs/test_keypairs_negative.py +++ b/tempest/api/compute/keypairs/test_keypairs_negative.py @@ -36,7 +36,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('29cca892-46ae-4d48-bc32-8fe7e731eb81') def test_keypair_create_with_invalid_pub_key(self): # Keypair should not be created with a non RSA public key - k_name = data_utils.rand_name('keypair-') + k_name = data_utils.rand_name('keypair') pub_key = "ssh-rsa JUNK nova@ubuntu" self.assertRaises(lib_exc.BadRequest, self._create_keypair, k_name, pub_key) @@ -45,7 +45,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('7cc32e47-4c42-489d-9623-c5e2cb5a2fa5') def test_keypair_delete_nonexistent_key(self): # Non-existent key deletion should throw a proper error - k_name = data_utils.rand_name("keypair-non-existent-") + k_name = data_utils.rand_name("keypair-non-existent") self.assertRaises(lib_exc.NotFound, self.client.delete_keypair, k_name) @@ -53,7 +53,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('dade320e-69ca-42a9-ba4a-345300f127e0') def test_create_keypair_with_empty_public_key(self): # Keypair should not be created with an empty public key - k_name = data_utils.rand_name("keypair-") + k_name = data_utils.rand_name("keypair") pub_key = ' ' self.assertRaises(lib_exc.BadRequest, self._create_keypair, k_name, pub_key) @@ -62,7 +62,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('fc100c19-2926-4b9c-8fdc-d0589ee2f9ff') def test_create_keypair_when_public_key_bits_exceeds_maximum(self): # Keypair should not be created when public key bits are too long - k_name = data_utils.rand_name("keypair-") + k_name = data_utils.rand_name("keypair") pub_key = 'ssh-rsa ' + 'A' * 2048 + ' openstack@ubuntu' self.assertRaises(lib_exc.BadRequest, self._create_keypair, k_name, pub_key) @@ -71,7 +71,7 @@ class KeyPairsNegativeTestJSON(base.BaseV2ComputeTest): @test.idempotent_id('0359a7f1-f002-4682-8073-0c91e4011b7c') def test_create_keypair_with_duplicate_name(self): # Keypairs with duplicate names should not be created - k_name = data_utils.rand_name('keypair-') + k_name = data_utils.rand_name('keypair') self.client.create_keypair(k_name) # Now try the same keyname to create another key self.assertRaises(lib_exc.Conflict, self._create_keypair, diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py index 71ee16a32..16e7acfee 100644 --- a/tempest/api/compute/security_groups/test_security_groups.py +++ b/tempest/api/compute/security_groups/test_security_groups.py @@ -137,8 +137,8 @@ class SecurityGroupsTestJSON(base.BaseSecurityGroupsTest): self.assertIn('id', securitygroup) securitygroup_id = securitygroup['id'] # Update the name and description - s_new_name = data_utils.rand_name('sg-hth-') - s_new_des = data_utils.rand_name('description-hth-') + s_new_name = data_utils.rand_name('sg-hth') + s_new_des = data_utils.rand_name('description-hth') self.client.update_security_group(securitygroup_id, name=s_new_name, description=s_new_des) diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py index 11ea30b27..e069f6e24 100644 --- a/tempest/api/compute/security_groups/test_security_groups_negative.py +++ b/tempest/api/compute/security_groups/test_security_groups_negative.py @@ -69,7 +69,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest): def test_security_group_create_with_invalid_group_name(self): # Negative test: Security Group should not be created with group name # as an empty string/with white spaces/chars more than 255 - s_description = data_utils.rand_name('description-') + s_description = data_utils.rand_name('description') # Create Security Group with empty string as group name self.assertRaises(lib_exc.BadRequest, self.client.create_security_group, "", s_description) @@ -91,7 +91,7 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest): def test_security_group_create_with_invalid_group_description(self): # Negative test:Security Group should not be created with description # as an empty string/with white spaces/chars more than 255 - s_name = data_utils.rand_name('securitygroup-') + s_name = data_utils.rand_name('securitygroup') # Create Security Group with empty string as description self.assertRaises(lib_exc.BadRequest, self.client.create_security_group, s_name, "") @@ -112,8 +112,8 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest): def test_security_group_create_with_duplicate_name(self): # Negative test:Security Group with duplicate name should not # be created - s_name = data_utils.rand_name('securitygroup-') - s_description = data_utils.rand_name('description-') + s_name = data_utils.rand_name('securitygroup') + s_description = data_utils.rand_name('description') self.create_security_group(s_name, s_description) # Now try the Security Group with the same 'Name' self.assertRaises(lib_exc.BadRequest, @@ -161,10 +161,10 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest): @test.services('network') def test_update_security_group_with_invalid_sg_id(self): # Update security_group with invalid sg_id should fail - s_name = data_utils.rand_name('sg-') - s_description = data_utils.rand_name('description-') + s_name = data_utils.rand_name('sg') + s_description = data_utils.rand_name('description') # Create a non int sg_id - sg_id_invalid = data_utils.rand_name('sg-') + sg_id_invalid = data_utils.rand_name('sg') self.assertRaises(lib_exc.BadRequest, self.client.update_security_group, sg_id_invalid, name=s_name, description=s_description) @@ -207,8 +207,8 @@ class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest): def test_update_non_existent_security_group(self): # Update a non-existent Security Group should Fail non_exist_id = self._generate_a_non_existent_security_group_id() - s_name = data_utils.rand_name('sg-') - s_description = data_utils.rand_name('description-') + s_name = data_utils.rand_name('sg') + s_description = data_utils.rand_name('description') self.assertRaises(lib_exc.NotFound, self.client.update_security_group, non_exist_id, name=s_name, diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py index 2094d83e0..f9ee75b8b 100644 --- a/tempest/api/compute/test_authorization.py +++ b/tempest/api/compute/test_authorization.py @@ -214,7 +214,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest): # A create keypair request should fail if the tenant id does not match # the current user # POST keypair with other user tenant - k_name = data_utils.rand_name('keypair-') + k_name = data_utils.rand_name('keypair') try: # Change the base URL to impersonate another user self.alt_keypairs_client.auth_provider.set_alt_auth_data( @@ -269,7 +269,7 @@ class AuthorizationTestJSON(base.BaseV2ComputeTest): # A create security group request should fail if the tenant id does not # match the current user # POST security group with other user tenant - s_name = data_utils.rand_name('security-') + s_name = data_utils.rand_name('security') s_description = data_utils.rand_name('security') try: # Change the base URL to impersonate another user diff --git a/tempest/api/compute/test_live_block_migration_negative.py b/tempest/api/compute/test_live_block_migration_negative.py index e1d353f1d..b59e3343b 100644 --- a/tempest/api/compute/test_live_block_migration_negative.py +++ b/tempest/api/compute/test_live_block_migration_negative.py @@ -49,7 +49,7 @@ class LiveBlockMigrationNegativeTestJSON(base.BaseV2ComputeAdminTest): @test.idempotent_id('7fb7856e-ae92-44c9-861a-af62d7830bcb') def test_invalid_host_for_migration(self): # Migrating to an invalid host should not change the status - target_host = data_utils.rand_name('host-') + target_host = data_utils.rand_name('host') server = self.create_test_server(wait_until="ACTIVE") server_id = server['id'] diff --git a/tempest/api/compute/volumes/test_volumes_negative.py b/tempest/api/compute/volumes/test_volumes_negative.py index 50ce19815..fb9f365e8 100644 --- a/tempest/api/compute/volumes/test_volumes_negative.py +++ b/tempest/api/compute/volumes/test_volumes_negative.py @@ -62,7 +62,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest): def test_create_volume_with_invalid_size(self): # Negative: Should not be able to create volume with invalid size # in request - v_name = data_utils.rand_name('Volume-') + v_name = data_utils.rand_name('Volume') metadata = {'Type': 'work'} self.assertRaises(lib_exc.BadRequest, self.client.create_volume, size='#$%', display_name=v_name, metadata=metadata) @@ -72,7 +72,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest): def test_create_volume_with_out_passing_size(self): # Negative: Should not be able to create volume without passing size # in request - v_name = data_utils.rand_name('Volume-') + v_name = data_utils.rand_name('Volume') metadata = {'Type': 'work'} self.assertRaises(lib_exc.BadRequest, self.client.create_volume, size='', display_name=v_name, metadata=metadata) @@ -81,7 +81,7 @@ class VolumesNegativeTest(base.BaseV2ComputeTest): @test.idempotent_id('8cce995e-0a83-479a-b94d-e1e40b8a09d1') def test_create_volume_with_size_zero(self): # Negative: Should not be able to create volume with size zero - v_name = data_utils.rand_name('Volume-') + v_name = data_utils.rand_name('Volume') metadata = {'Type': 'work'} self.assertRaises(lib_exc.BadRequest, self.client.create_volume, size='0', display_name=v_name, metadata=metadata) |