Skip to content

Commit 2ce3030

Browse files
test_logging is fixed (#340)
1 parent 9b011a2 commit 2ce3030

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test_testgres_common.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,14 +1059,16 @@ def test_logging(self, node_svc: PostgresNodeService):
10591059
assert lines is not None
10601060
assert type(lines) == list # noqa: E721
10611061

1062-
def LOCAL__test_lines():
1062+
def LOCAL__test_lines(lines: typing.Iterable[str]) -> bool:
1063+
assert isinstance(lines, typing.Iterable)
10631064
for s in lines:
1064-
if any(C_NODE_NAME in s for s in lines):
1065+
assert type(s) == str # noqa: E721
1066+
if C_NODE_NAME in s:
10651067
logging.info("OK. We found the node_name in a line \"{0}\"".format(s))
10661068
return True
1067-
return False
1069+
return False
10681070

1069-
if LOCAL__test_lines():
1071+
if LOCAL__test_lines(lines):
10701072
break
10711073

10721074
logging.info("Master node log file does not have an expected information.")

0 commit comments

Comments
 (0)