Skip to content

Commit

Permalink
Use driver for RegexpParser tests
Browse files Browse the repository at this point in the history
Signed-off-by: abetomo <[email protected]>
  • Loading branch information
abetomo committed Mar 9, 2023
1 parent 248160f commit 13d42dc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions test/plugin/test_parser_regexp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ def create_driver(regexp, conf = {}, initialize_conf: false)
if initialize_conf
Fluent::Test::Driver::Parser.new(Fluent::Compat::TextParser::RegexpParser.new(regexp, conf))
else
# Fluent::Test::Driver::Parser.new(Fluent::Compat::TextParser::RegexpParser.new(regexp)).configure(conf)
instance = Fluent::Compat::TextParser::RegexpParser.new(regexp)
instance.configure(conf)
d = Struct.new(:instance).new
d.instance = instance
d
Fluent::Test::Driver::Parser.new(Fluent::Compat::TextParser::RegexpParser.new(regexp)).configure(conf)
end
end

Expand Down

0 comments on commit 13d42dc

Please sign in to comment.