From f766d74fb60650f2a48baac130c7a979afbc7186 Mon Sep 17 00:00:00 2001 From: Vitaly Baranov Date: Fri, 18 Jun 2021 06:18:40 +0300 Subject: [PATCH] Fix testflows LDAP tests. --- tests/testflows/ldap/authentication/tests/common.py | 4 ++-- tests/testflows/ldap/external_user_directory/tests/common.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testflows/ldap/authentication/tests/common.py b/tests/testflows/ldap/authentication/tests/common.py index 0f36879ef62..ec6a66c0257 100644 --- a/tests/testflows/ldap/authentication/tests/common.py +++ b/tests/testflows/ldap/authentication/tests/common.py @@ -92,7 +92,7 @@ def add_config(config, timeout=300, restart=False, modify=False): """Check that preprocessed config is updated. """ started = time.time() - command = f"cat /var/lib/clickhouse/preprocessed_configs/_{config.preprocessed_name} | grep {config.uid}{' > /dev/null' if not settings.debug else ''}" + command = f"cat /var/lib/clickhouse/preprocessed_configs/{config.preprocessed_name} | grep {config.uid}{' > /dev/null' if not settings.debug else ''}" while time.time() - started < timeout: exitcode = node.command(command, steps=False).exitcode @@ -105,7 +105,7 @@ def add_config(config, timeout=300, restart=False, modify=False): time.sleep(1) if settings.debug: - node.command(f"cat /var/lib/clickhouse/preprocessed_configs/_{config.preprocessed_name}") + node.command(f"cat /var/lib/clickhouse/preprocessed_configs/{config.preprocessed_name}") if after_removal: assert exitcode == 1, error() diff --git a/tests/testflows/ldap/external_user_directory/tests/common.py b/tests/testflows/ldap/external_user_directory/tests/common.py index f23356bd061..f6d1654efd6 100644 --- a/tests/testflows/ldap/external_user_directory/tests/common.py +++ b/tests/testflows/ldap/external_user_directory/tests/common.py @@ -138,7 +138,7 @@ def invalid_ldap_external_user_directory_config(server, roles, message, tail=30, with Then(f"{config.preprocessed_name} should be updated", description=f"timeout {timeout}"): started = time.time() - command = f"cat /var/lib/clickhouse/preprocessed_configs/_{config.preprocessed_name} | grep {config.uid}{' > /dev/null' if not settings.debug else ''}" + command = f"cat /var/lib/clickhouse/preprocessed_configs/{config.preprocessed_name} | grep {config.uid}{' > /dev/null' if not settings.debug else ''}" while time.time() - started < timeout: exitcode = node.command(command, steps=False).exitcode if exitcode == 0: