Fix testflows LDAP tests.

This commit is contained in:
Vitaly Baranov 2021-06-18 06:18:40 +03:00
parent fc3d77bd66
commit f766d74fb6
2 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ def add_config(config, timeout=300, restart=False, modify=False):
"""Check that preprocessed config is updated. """Check that preprocessed config is updated.
""" """
started = time.time() 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: while time.time() - started < timeout:
exitcode = node.command(command, steps=False).exitcode exitcode = node.command(command, steps=False).exitcode
@ -105,7 +105,7 @@ def add_config(config, timeout=300, restart=False, modify=False):
time.sleep(1) time.sleep(1)
if settings.debug: 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: if after_removal:
assert exitcode == 1, error() assert exitcode == 1, error()

View File

@ -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}"): with Then(f"{config.preprocessed_name} should be updated", description=f"timeout {timeout}"):
started = time.time() 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: while time.time() - started < timeout:
exitcode = node.command(command, steps=False).exitcode exitcode = node.command(command, steps=False).exitcode
if exitcode == 0: if exitcode == 0: