Skip to content

Commit dd9da9b

Browse files
committed
Tests ignore events of unexpected type
1 parent b7af95d commit dd9da9b

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

tests/server.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@ def _wait_events(
109109
if len(events) == 0:
110110
return
111111
elif strict:
112-
# Container events are fully controlled by the test,
113-
# so any mismatch is a real failure. Node events may
114-
# include system noise (e.g. SELinux xattr changes)
115-
# that the test cannot predict, so they are skipped.
116-
is_container_event = bool(msg.process.container_id)
117-
if is_container_event:
112+
# In strict mode, fail when the event type matches but
113+
# the content differs. Events of a different type are
114+
# skipped since they may be system noise that the test
115+
# cannot predict (e.g. SELinux xattr changes).
116+
if 'event_type' not in diff:
118117
raise ValueError(json.dumps(diff, indent=4))
119118

120119
def wait_events(self, events: list[Event], strict: bool = True):

0 commit comments

Comments
 (0)