Skip to content

Commit 0f190fe

Browse files
committed
checklogs: fix no cnt case
1 parent dc320fd commit 0f190fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sipssert/task.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ def check_logs(self):
357357
f"expected {expected} matches, got {count}"
358358
)
359359
return False
360+
elif expected is None and count == 0:
361+
self.log.error(
362+
f"logs check failed for {pattern}; should match"
363+
)
364+
return False
360365
else:
361366
pattern = rule
362367
if not re.search(pattern, logs):

0 commit comments

Comments
 (0)