Skip to content

Commit a273a05

Browse files
elyscapesuyograo
authored andcommitted
Match the entire string when testing
This allows for validating that a pattern will fail to match an entire string, even if it would match partially. Fixes #114
1 parent edb011a commit a273a05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def grok_match(label, message)
1919
end
2020

2121
def build_grok(label)
22-
grok = LogStash::Filters::Grok.new("match" => ["message", "%{#{label}}"])
22+
grok = LogStash::Filters::Grok.new("match" => ["message", "\A%{#{label}}\z"])
2323
grok.register
2424
grok
2525
end

0 commit comments

Comments
 (0)