Skip to content

Commit 7cbfcf0

Browse files
committed
normalize cmd names for comparison
1 parent 55bff2d commit 7cbfcf0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/unified_format.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ class EventListenerUtil(CommandListener):
135135
def __init__(self, observe_events, ignore_commands):
136136
self._event_types = set(observe_events)
137137
self._ignore_commands = _SENSITIVE_COMMANDS | set(ignore_commands)
138-
self._ignore_commands.add('configureFailPoint')
138+
self._ignore_commands.add('configurefailpoint')
139139
self.results = []
140140

141141
def _observe_event(self, event):
142-
if event.command_name not in self._ignore_commands:
142+
if event.command_name.lower() not in self._ignore_commands:
143143
self.results.append(event)
144144

145145
def started(self, event):
@@ -193,6 +193,7 @@ def _create_entity(self, entity_spec):
193193
observe_events = spec.get('observeEvents', [])
194194
ignore_commands = spec.get('ignoreCommandMonitoringEvents', [])
195195
if len(observe_events) or len(ignore_commands):
196+
ignore_commands = [cmd.lower() for cmd in ignore_commands]
196197
listener = EventListenerUtil(observe_events, ignore_commands)
197198
self._listeners[spec['id']] = listener
198199
kwargs['event_listeners'] = [listener]

0 commit comments

Comments
 (0)