Harden manage negative tests
We attempt to manage a share with a fake/invalid
path in some tests and expect asynchronous
failures. So as long as there's only one of these
fake/invalid exports known to manila at a time,
there's no issue. However, when tests are run in
parallel, we see failures because manila validates
that the export path provided isn't known so far.
Change-Id: Ic1ed8c559221417347eeb71441ed8e941d70b8f1
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
diff --git a/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py b/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
index deb5e05..39b9557 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
@@ -50,7 +50,7 @@
def resource_setup(cls):
super(ManageNFSShareNegativeTest, cls).resource_setup()
# Create share type
- cls.st_name = data_utils.rand_name("manage-st-name")
+ cls.st_name = data_utils.rand_name(name="manage-st-name")
cls.extra_specs = {
'storage_protocol': CONF.share.capability_storage_protocol,
'driver_handles_share_servers': CONF.share.multitenancy_enabled,
@@ -155,7 +155,8 @@
self._unmanage_share_and_wait(share)
for invalid_key, invalid_value in (
- ('export_path', 'invalid_export'),
+ ('export_path',
+ data_utils.rand_name(name='invalid-share-export')),
('protocol', 'invalid_protocol'),
):
@@ -259,7 +260,7 @@
# forge bad param to have a share in manage_error state
invalid_params = valid_params.copy()
invalid_params.update(
- {'export_path': 'invalid-%s-share' % self.protocol}
+ {'export_path': data_utils.rand_name(name='invalid-share-export')}
)
invalid_share = self.shares_v2_client.manage_share(**invalid_params)