Remove hyphen from rand_name calls in baremetal 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 baremetal tests.
Change-Id: I43fde9b537f7d225266ebb3950b6768aa7ae9fae
diff --git a/tempest/api/baremetal/admin/base.py b/tempest/api/baremetal/admin/base.py
index cf2484d..9aeea0a 100644
--- a/tempest/api/baremetal/admin/base.py
+++ b/tempest/api/baremetal/admin/base.py
@@ -115,7 +115,7 @@
:return: Created chassis.
"""
- description = description or data_utils.rand_name('test-chassis-')
+ description = description or data_utils.rand_name('test-chassis')
resp, body = cls.client.create_chassis(description=description)
return resp, body
diff --git a/tempest/api/baremetal/admin/test_chassis.py b/tempest/api/baremetal/admin/test_chassis.py
index ef2113c..2011905 100644
--- a/tempest/api/baremetal/admin/test_chassis.py
+++ b/tempest/api/baremetal/admin/test_chassis.py
@@ -36,7 +36,7 @@
@test.attr(type='smoke')
@test.idempotent_id('7c5a2e09-699c-44be-89ed-2bc189992d42')
def test_create_chassis(self):
- descr = data_utils.rand_name('test-chassis-')
+ descr = data_utils.rand_name('test-chassis')
_, chassis = self.create_chassis(description=descr)
self.assertEqual(chassis['description'], descr)
@@ -77,7 +77,7 @@
_, body = self.create_chassis()
uuid = body['uuid']
- new_description = data_utils.rand_name('new-description-')
+ new_description = data_utils.rand_name('new-description')
_, body = (self.client.update_chassis(uuid,
description=new_description))
_, chassis = self.client.show_chassis(uuid)