Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions test/testcases/test_data_onboarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ def test_data_onboarding(self, setup, test_scenario, test_input, expected):
logger.info("Splunk received %s events in the last hour", len(events))
assert len(events) == expected

@pytest.mark.parametrize("test_scenario, test_input, expected", [
("protobuf", "sourcetype::protobuf", 1),
])
def test_proto_data_onboarding(self, setup, test_scenario, test_input, expected):
logger.info(f"testing {test_scenario} input={test_input} expected={expected} event(s)")
search_query = f"index={setup['splunk_index']} | search {test_input}"
logger.info(search_query)
events = check_events_from_splunk(start_time="-15m@m",
url=setup["splunkd_url"],
user=setup["splunk_user"],
query=[f"search {search_query}"],
password=setup["splunk_password"])
logger.info("Splunk received %s events in the last hour", len(events))
assert len(events) == expected
# @pytest.mark.parametrize("test_scenario, test_input, expected", [
# ("protobuf", "sourcetype::protobuf", 1),
# ])
# def test_proto_data_onboarding(self, setup, test_scenario, test_input, expected):
# logger.info(f"testing {test_scenario} input={test_input} expected={expected} event(s)")
# search_query = f"index={setup['splunk_index']} | search {test_input}"
# logger.info(search_query)
# events = check_events_from_splunk(start_time="-15m@m",
# url=setup["splunkd_url"],
# user=setup["splunk_user"],
# query=[f"search {search_query}"],
# password=setup["splunk_password"])
# logger.info("Splunk received %s events in the last hour", len(events))
# assert len(events) == expected

@pytest.mark.parametrize("test_scenario, test_input, expected", [
("date_format", "latest=1365209605.000 sourcetype::date_format", "2010-06-13T23:11:52.454+00:00"),
Expand Down