Skip to content

Commit

Permalink
Merge pull request #4085 from abetomo/use-driver-for-parser_regexp-tests
Browse files Browse the repository at this point in the history
Use driver for RegexpParser tests
  • Loading branch information
ashie authored Mar 9, 2023
2 parents 59399c1 + 13d42dc commit 8812ec1
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 8812ec1

Please sign in to comment.