summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-03-23 02:00:19 +0000
committerKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-03-30 01:24:05 +0000
commit6ded8df3b82680a63fd5b28f2ca71d2045e9f592 (patch)
treef3a08469093e7bf6dff497c1df293f03566831f3
parentd0057586b9c2313c9d5eb370d3eb9b67e54f566f (diff)
downloadtempest-6ded8df3b82680a63fd5b28f2ca71d2045e9f592.tar.gz
Remove hyphen from rand_name calls in scenario tests
data_utils.rand_name() appends randam charactors with a hypen like: def rand_name(name=''): randbits = str(random.randint(1, 0x7fffffff)) if name: return name + '-' + randbits So it is not necessary to specify a hypen in caller side. This patch removes a hypen in scenario tests. Change-Id: I21f19e27c3081ac35317d9422436bd8062eced2d
-rw-r--r--tempest/scenario/manager.py4
-rw-r--r--tempest/scenario/test_large_ops.py2
-rw-r--r--tempest/scenario/test_network_basic_ops.py2
-rw-r--r--tempest/scenario/test_security_groups_basic_ops.py6
-rw-r--r--tempest/scenario/test_stamp_pattern.py2
5 files changed, 8 insertions, 8 deletions
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index bae829677..ebdebcfef 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -401,7 +401,7 @@ class ScenarioTest(tempest.test.BaseTestCase):
# Compute client
_images_client = self.images_client
if name is None:
- name = data_utils.rand_name('scenario-snapshot-')
+ name = data_utils.rand_name('scenario-snapshot')
LOG.debug("Creating a snapshot image for server: %s", server['name'])
image = _images_client.create_image(server['id'], name)
image_id = image.response['location'].split('images/')[1]
@@ -1317,7 +1317,7 @@ class EncryptionScenarioTest(ScenarioTest):
client = self.admin_volume_types_client
if not name:
name = 'generic'
- randomized_name = data_utils.rand_name('scenario-type-' + name + '-')
+ randomized_name = data_utils.rand_name('scenario-type-' + name)
LOG.debug("Creating a volume type: %s", randomized_name)
body = client.create_volume_type(
randomized_name)
diff --git a/tempest/scenario/test_large_ops.py b/tempest/scenario/test_large_ops.py
index 145efe7da..0789c2141 100644
--- a/tempest/scenario/test_large_ops.py
+++ b/tempest/scenario/test_large_ops.py
@@ -78,7 +78,7 @@ class TestLargeOpsScenario(manager.ScenarioTest):
self.servers_client.wait_for_server_status(server['id'], status)
def nova_boot(self):
- name = data_utils.rand_name('scenario-server-')
+ name = data_utils.rand_name('scenario-server')
flavor_id = CONF.compute.flavor_ref
# Explicitly create secgroup to avoid cleanup at the end of testcases.
# Since no traffic is tested, we don't need to actually add rules to
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index bb1985374..835304813 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -214,7 +214,7 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
def _reassociate_floating_ips(self):
floating_ip, server = self.floating_ip_tuple
- name = data_utils.rand_name('new_server-smoke-')
+ name = data_utils.rand_name('new_server-smoke')
# create a new server for the floating ip
server = self._create_server(name, self.network)
self._associate_floating_ip(floating_ip, server)
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index cffb2fed8..4fab38b80 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -256,7 +256,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
def _create_tenant_servers(self, tenant, num=1):
for i in range(num):
- name = 'server-{tenant}-gen-{num}-'.format(
+ name = 'server-{tenant}-gen-{num}'.format(
tenant=tenant.creds.tenant_name,
num=i
)
@@ -271,7 +271,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
workaround ip namespace
"""
secgroups = tenant.security_groups.values()
- name = 'server-{tenant}-access_point-'.format(
+ name = 'server-{tenant}-access_point'.format(
tenant=tenant.creds.tenant_name)
name = data_utils.rand_name(name)
server = self._create_server(name, tenant,
@@ -497,7 +497,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
new_tenant.security_groups.update(new_sg=new_sg)
# Create server with default security group
- name = 'server-{tenant}-gen-1-'.format(
+ name = 'server-{tenant}-gen-1'.format(
tenant=new_tenant.creds.tenant_name
)
name = data_utils.rand_name(name)
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index f7653e78a..056159e1d 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -78,7 +78,7 @@ class TestStampPattern(manager.ScenarioTest):
return self.get_remote_client(server_or_ip)
def _create_volume_snapshot(self, volume):
- snapshot_name = data_utils.rand_name('scenario-snapshot-')
+ snapshot_name = data_utils.rand_name('scenario-snapshot')
_, snapshot = self.snapshots_client.create_snapshot(
volume['id'], display_name=snapshot_name)