Skip to content

Commit 60a7cd1

Browse files
committed
Update offline pack tests for integration plugins
Fix wildcard "logstash-filter-*" test Add test for offline packaging of integaration plugins Fixes #11406
1 parent f06c5ef commit 60a7cd1

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

qa/integration/specs/cli/prepare_offline_pack_spec.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,26 @@
3535
end
3636
end
3737

38+
context "creating a pack for integration plugins" do
39+
let(:plugin_to_pack) { "logstash-integration-jdbc" }
40+
41+
42+
it "successfully create a pack" do
43+
execute = @logstash_plugin.prepare_offline_pack(plugin_to_pack, temporary_zip_file)
44+
45+
expect(execute.exit_code).to eq(0)
46+
expect(execute.stderr_and_stdout).to match(/Offline package created at/)
47+
expect(execute.stderr_and_stdout).to match(/#{temporary_zip_file}/)
48+
49+
unpacked = unpack(temporary_zip_file)
50+
expect(unpacked.plugins.collect(&:name)).to include(plugin_to_pack)
51+
expect(unpacked.plugins.size).to eq(1)
52+
53+
expect(unpacked.dependencies.size).to be > 0
54+
end
55+
end
56+
57+
3858
context "create a pack from a wildcard" do
3959
let(:plugins_to_pack) { %w(logstash-filter-*) }
4060

@@ -50,7 +70,7 @@
5070
filters = @logstash_plugin.list(plugins_to_pack.first)
5171
.stderr_and_stdout.split("\n")
5272
.delete_if do |line|
53-
line =~ /cext|JAVA_OPT|fatal|^WARNING|Option \w+ was deprecated/
73+
line =~ /cext|├──|└──|logstash-integration|JAVA_OPT|fatal|^WARNING|Option \w+ was deprecated/
5474
end
5575

5676
expect(unpacked.plugins.collect(&:name)).to include(*filters)

0 commit comments

Comments
 (0)