Fix to parse config with embedded code

This commit is contained in:
uu59 2015-04-02 12:47:45 +09:00
parent 818e5d96bf
commit aaf4f179ab
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ class Fluentd::SettingsController < ApplicationController
def parse_config(conf)
# V1Parser.parse could raise exception
Fluent::Config::V1Parser.parse(conf, @fluentd.config_file)
Fluent::Config::V1Parser.parse(conf, @fluentd.config_file, File.dirname(@fluentd.config_file), binding)
end
def update_config(conf)

View File

@ -82,12 +82,12 @@ describe 'setting', stub: :daemon do
it 'configtest' do
click_button I18n.t('terms.configtest')
page.should have_css('.alert-danger')
page.should have_css('.alert-success')
end
it "update & restart check" do
click_button I18n.t('terms.update')
page.should have_css('.alert-danger')
daemon.agent.config.gsub("\r\n", "\n").should == conf # CodeMirror exchange \n -> \r\n
end
end
end