Skip td-agent tests if td-agent doesn't installed

This commit is contained in:
uu59 2015-02-04 16:02:26 +09:00
parent c1483f74be
commit a9a1dfdfa2
2 changed files with 7 additions and 1 deletions

View File

@ -98,7 +98,7 @@ describe Fluentd::Agent do
end
end
describe "TdAgent" do
describe "TdAgent", td_agent_required: true do
let(:described_class) { Fluentd::Agent::TdAgent } # override nested described_class behavior as https://github.com/rspec/rspec-core/issues/1114
it_should_behave_like "Fluentd::Agent has common behavior"

View File

@ -62,6 +62,12 @@ RSpec.configure do |config|
# rspec 2.99
config.infer_spec_type_from_file_location!
unless File.directory?("/opt/td-agent")
# including td-agent specific tests, so some tests will fail if the system has no td-agent
warn "\n\nSkipping td-agent specific tests (system has no td-agent)\n\n"
config.filter_run_excluding :td_agent_required => true
end
config.after(:suite) do
FileUtils.rm_rf FluentdUI.data_dir
end