From ec97d3d78cd421e31cac8e12a3ac61c55227e902 Mon Sep 17 00:00:00 2001 From: Pere Urbon-Bayes Date: Mon, 12 Jan 2015 14:44:04 +0100 Subject: [PATCH] add a way to run all plugin test from a rake command Fixes #2373 --- rakelib/plugin.rake | 2 +- rakelib/test.rake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rakelib/plugin.rake b/rakelib/plugin.rake index 494b4c200..25c296e6a 100644 --- a/rakelib/plugin.rake +++ b/rakelib/plugin.rake @@ -21,7 +21,7 @@ namespace "plugin" do Rake::Task["vendor:bundle"].invoke("tools/Gemfile.plugins.test") end - task "install-all" do + task "install-all" => [ "dependency:octokit" ] do Rake::Task["vendor:bundle"].invoke("tools/Gemfile.plugins.all") end diff --git a/rakelib/test.rake b/rakelib/test.rake index b276d6c4d..cb34ae509 100644 --- a/rakelib/test.rake +++ b/rakelib/test.rake @@ -16,6 +16,11 @@ namespace "test" do RSpec::Core::Runner.run(["--fail-fast", *Rake::FileList["spec/**/*.rb"]]) end + task "plugins" => [ "bootstrap","plugin:install-all" ] do + pattern = "vendor/bundle/jruby/1.9/gems/logstash-*/spec/{input,filter,codec,output}s/*_spec.rb" + sh "./bin/logstash rspec #{pattern}" + end + task "prep" do Rake::Task["vendor:gems"].invoke(false) Rake::Task["plugin:install-test"].invoke