Unit test: fix flaky test_networks_returned_with_creds
Test test_networks_returned_with_creds is run twice, once for Credentials V2
and once for Credentials V3. They shouldn't run at the same time because
they have a side effect to create/or read the same directory. (look at
`_get_free_hash` in preprov_creds.py).
We fix this race by letting each test own a different directory.
Note: the proper fix is to properly mock the environment. But this is
beyond my understanding of the code. This fix is good enough imo and
fixes a Gate failure.
Change-Id: Ia324c510e91ede4fb387c310ad2a24d15325058e
Fixes-Bug: #1586640
diff --git a/tempest/tests/common/test_preprov_creds.py b/tempest/tests/common/test_preprov_creds.py
index 22bbdd3..873c4c4 100644
--- a/tempest/tests/common/test_preprov_creds.py
+++ b/tempest/tests/common/test_preprov_creds.py
@@ -352,7 +352,7 @@
fixed_params = {'name': 'test class',
'identity_version': 'v3',
'test_accounts_file': 'fake_accounts_file',
- 'accounts_lock_dir': 'fake_locks_dir',
+ 'accounts_lock_dir': 'fake_locks_dir_v3',
'admin_role': 'admin',
'object_storage_operator_role': 'operator',
'object_storage_reseller_admin_role': 'reseller'}