Skip to content

Commit

Permalink
Update test_common.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Bonsack committed Jan 3, 2020
1 parent 1ef1267 commit dd2969a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ def test_internal(record_property, setup_wordlist, setup_splunk):

assert resultCount == 1

def test_tag(record_property, setup_wordlist, setup_splunk):
def test_fallback(record_property, setup_wordlist, setup_splunk):
host = "{}-{}".format(random.choice(setup_wordlist), random.choice(setup_wordlist))

mt = env.from_string("{{ mark }} {% now 'utc', '%b %d %H:%M:%S' %} testvp-{{ host }} test\n")
message = mt.render(mark="<111>", host=host)

sendsingle(message)

st = env.from_string("search index=main host=\"testvp-{{ host }}\" sourcetype=\"sc4s:fallback\" sc4s_vendor_product=test_test | head 2")
st = env.from_string("search index=main host=\"testvp-{{ host }}\" sourcetype=\"sc4s:fallback\" | head 2")
search = st.render(host=host)

resultCount, eventCount = splunk_single(setup_splunk, search)
Expand Down

0 comments on commit dd2969a

Please sign in to comment.