Skip to content

Commit

Permalink
Reduce the scope of wilcards tests
Browse files Browse the repository at this point in the history
Instead of downloading all the filter plugins we reduce the scope to
just download the `logstash-filter-x*` files, this will make the test
faster and reduce the risk of running into IOError.

Ref: elastic#6904

Fixes elastic#7211
  • Loading branch information
ph committed May 25, 2017
1 parent dee9563 commit 1ea449f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/unit/plugin_manager/offline_plugin_packager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def retrieve_dependencies_gems(path)
end

context "with wildcards" do
let(:plugins_args) { ["logstash-filter-*"] }
let(:plugins_args) { ["logstash-filter-x*"] }

it "creates a pack with the plugins" do
expect(retrieve_packaged_plugins(extract_to).size).to eq(LogStash::PluginManager::SpecificationHelpers.find_by_name_with_wildcards(plugins_args.first).size)
Expand All @@ -120,7 +120,7 @@ def retrieve_dependencies_gems(path)
end

context "with wildcards and normal plugins" do
let(:plugins_args) { ["logstash-filter-*", "logstash-input-beats"] }
let(:plugins_args) { ["logstash-filter-x*", "logstash-input-beats"] }

it "creates a pack with the plugins" do
groups = retrieve_packaged_plugins(extract_to).group_by { |gem_file| ::File.basename(gem_file).split("-")[1] }
Expand Down

0 comments on commit 1ea449f

Please sign in to comment.