From 5d4b6eec693995b2b34946df1840039370cad2e4 Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 12 Dec 2023 15:25:20 +0100 Subject: [PATCH] tests: ensure len(username) = 9 if CHATMAIL_DOMAIN2==nine.testrun.org --- cmdeploy/src/cmdeploy/tests/plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmdeploy/src/cmdeploy/tests/plugin.py b/cmdeploy/src/cmdeploy/tests/plugin.py index 98db6049..943a0dd4 100644 --- a/cmdeploy/src/cmdeploy/tests/plugin.py +++ b/cmdeploy/src/cmdeploy/tests/plugin.py @@ -240,7 +240,10 @@ def gencreds(chatmail_config): user = "".join( random.choices(alphanumeric, k=chatmail_config.username_max_length) ) - user = f"ac{num}_{user}"[: chatmail_config.username_max_length] + if domain == "nine.testrun.org": + user = f"ac{num}_{user}"[:9] + else: + user = f"ac{num}_{user}"[: chatmail_config.username_max_length] password = "".join( random.choices(alphanumeric, k=chatmail_config.password_min_length) )