Skip to content

Commit

Permalink
fix: Fix python unit tests (#3734)
Browse files Browse the repository at this point in the history
* Fix regex log_string_to_wait_for to be more generic for changing versions of mysql

Signed-off-by: Crispin Logan <crispin.logan@ki-insurance.com>

* Add noqa otherwise flake incorrectly flags W605

Signed-off-by: Crispin Logan <crispin.logan@ki-insurance.com>

---------

Signed-off-by: Crispin Logan <crispin.logan@ki-insurance.com>
  • Loading branch information
crispin-ki committed Aug 16, 2023
1 parent 7bc7c47 commit e81684d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/python/tests/unit/test_sql_registry.py
Expand Up @@ -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,
Expand Down

0 comments on commit e81684d

Please sign in to comment.