Skip to content

Commit

Permalink
Add tests for utf8 errors
Browse files Browse the repository at this point in the history
* Add test for utf8 errors from parsers
  • Loading branch information
Mark Bonsack committed Apr 14, 2020
1 parent 9a3e1d3 commit c1f4250
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,16 @@ def test_check_config_version_multiple(record_property, setup_wordlist, setup_sp

assert resultCount == 0

def test_check_utf8(record_property, setup_wordlist, setup_splunk, setup_sc4s):
st = env.from_string(
"search earliest=-50m@m latest=+1m@m index=main sourcetype=\"sc4s:events\" \"Input is valid utf8\"")
search = st.render()

resultCount, eventCount = splunk_single(setup_splunk, search)

record_property("resultCount", resultCount)

assert resultCount == 0

def test_check_sc4s_version(record_property, setup_wordlist, setup_splunk, setup_sc4s):

Expand Down

0 comments on commit c1f4250

Please sign in to comment.