Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Winlogbeat test by checking full hostname #3942

Merged
merged 1 commit into from Apr 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion winlogbeat/tests/system/winlogbeat.py
@@ -1,4 +1,5 @@
import os
import platform
import sys

if sys.platform.startswith("win"):
Expand Down Expand Up @@ -96,7 +97,7 @@ def read_events(self, config=None, expected_events=1):

def assert_common_fields(self, evt, msg=None, eventID=10, sid=None,
level="Information", extra=None):
assert evt["computer_name"].lower() == win32api.GetComputerName().lower()
assert evt["computer_name"].lower() == platform.node().lower()
assert "record_number" in evt
self.assertDictContainsSubset({
"event_id": eventID,
Expand Down