mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Update offline pack tests for integration plugins
Fix wildcard "logstash-filter-*" test Add test for offline packaging of integaration plugins Fixes #11406
This commit is contained in:
parent
f06c5ef806
commit
60a7cd1de2
1 changed files with 21 additions and 1 deletions
|
@ -35,6 +35,26 @@ describe "CLI > logstash-plugin prepare-offline-pack" do
|
|||
end
|
||||
end
|
||||
|
||||
context "creating a pack for integration plugins" do
|
||||
let(:plugin_to_pack) { "logstash-integration-jdbc" }
|
||||
|
||||
|
||||
it "successfully create a pack" do
|
||||
execute = @logstash_plugin.prepare_offline_pack(plugin_to_pack, temporary_zip_file)
|
||||
|
||||
expect(execute.exit_code).to eq(0)
|
||||
expect(execute.stderr_and_stdout).to match(/Offline package created at/)
|
||||
expect(execute.stderr_and_stdout).to match(/#{temporary_zip_file}/)
|
||||
|
||||
unpacked = unpack(temporary_zip_file)
|
||||
expect(unpacked.plugins.collect(&:name)).to include(plugin_to_pack)
|
||||
expect(unpacked.plugins.size).to eq(1)
|
||||
|
||||
expect(unpacked.dependencies.size).to be > 0
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
context "create a pack from a wildcard" do
|
||||
let(:plugins_to_pack) { %w(logstash-filter-*) }
|
||||
|
||||
|
@ -50,7 +70,7 @@ describe "CLI > logstash-plugin prepare-offline-pack" do
|
|||
filters = @logstash_plugin.list(plugins_to_pack.first)
|
||||
.stderr_and_stdout.split("\n")
|
||||
.delete_if do |line|
|
||||
line =~ /cext|JAVA_OPT|fatal|^WARNING|Option \w+ was deprecated/
|
||||
line =~ /cext|├──|└──|logstash-integration|JAVA_OPT|fatal|^WARNING|Option \w+ was deprecated/
|
||||
end
|
||||
|
||||
expect(unpacked.plugins.collect(&:name)).to include(*filters)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue