From e81684d4f7916c986fa8e6cf06c2918951469799 Mon Sep 17 00:00:00 2001 From: crispin-ki <131684659+crispin-ki@users.noreply.github.com> Date: Wed, 16 Aug 2023 20:42:10 +0100 Subject: [PATCH] fix: Fix python unit tests (#3734) * Fix regex log_string_to_wait_for to be more generic for changing versions of mysql Signed-off-by: Crispin Logan * Add noqa otherwise flake incorrectly flags W605 Signed-off-by: Crispin Logan --------- Signed-off-by: Crispin Logan --- sdk/python/tests/unit/test_sql_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/python/tests/unit/test_sql_registry.py b/sdk/python/tests/unit/test_sql_registry.py index 1c2b5a36dd..39896d3a9d 100644 --- a/sdk/python/tests/unit/test_sql_registry.py +++ b/sdk/python/tests/unit/test_sql_registry.py @@ -91,7 +91,7 @@ def mysql_registry(): container.start() # The log string uses '8.0.*' since the version might be changed as new Docker images are pushed. - log_string_to_wait_for = "/usr/sbin/mysqld: ready for connections. Version: '8.0.*' socket: '/var/run/mysqld/mysqld.sock' port: 3306" + log_string_to_wait_for = "/usr/sbin/mysqld: ready for connections. Version: '(\d+(\.\d+){1,2})' socket: '/var/run/mysqld/mysqld.sock' port: 3306" # noqa: W605 waited = wait_for_logs( container=container, predicate=log_string_to_wait_for,