Make username and project use same random ID
Username and project name generated by dynamic credentials use
to different random IDs, which makes it difficult to relate them
when looking at log files. Use the same ID for both.
Change-Id: I91df48152f848bbdf1e1450e88be3c1cb04960af
diff --git a/tempest/common/dynamic_creds.py b/tempest/common/dynamic_creds.py
index e5d65f5..3a3e3c2 100644
--- a/tempest/common/dynamic_creds.py
+++ b/tempest/common/dynamic_creds.py
@@ -122,7 +122,9 @@
project = self.creds_client.create_project(
name=project_name, description=project_desc)
- username = data_utils.rand_name(root) + suffix
+ # NOTE(andreaf) User and project can be distinguished from the context,
+ # having the same ID in both makes it easier to match them and debug.
+ username = project_name
user_password = data_utils.rand_password()
email = data_utils.rand_name(root) + suffix + "@example.com"
user = self.creds_client.create_user(