logstash-integration-logstash 1.0.0-java → 1.0.2-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/VERSION +1 -1
- data/lib/logstash/inputs/logstash.rb +4 -2
- data/lib/logstash/outputs/logstash.rb +3 -0
- data/spec/fixtures/certs/generated/client_from_root.jks +0 -0
- data/spec/fixtures/certs/generated/client_from_root.key.pem +50 -50
- data/spec/fixtures/certs/generated/client_from_root.key.pkcs8.pem +52 -52
- data/spec/fixtures/certs/generated/client_from_root.p12 +0 -0
- data/spec/fixtures/certs/generated/client_from_root.pem +28 -28
- data/spec/fixtures/certs/generated/client_from_untrusted.jks +0 -0
- data/spec/fixtures/certs/generated/client_from_untrusted.key.pem +50 -50
- data/spec/fixtures/certs/generated/client_from_untrusted.key.pkcs8.pem +52 -52
- data/spec/fixtures/certs/generated/client_from_untrusted.p12 +0 -0
- data/spec/fixtures/certs/generated/client_from_untrusted.pem +28 -28
- data/spec/fixtures/certs/generated/client_self_signed.jks +0 -0
- data/spec/fixtures/certs/generated/client_self_signed.key.pem +50 -50
- data/spec/fixtures/certs/generated/client_self_signed.key.pkcs8.pem +52 -52
- data/spec/fixtures/certs/generated/client_self_signed.p12 +0 -0
- data/spec/fixtures/certs/generated/client_self_signed.pem +28 -28
- data/spec/fixtures/certs/generated/root.key.pem +50 -50
- data/spec/fixtures/certs/generated/root.pem +28 -28
- data/spec/fixtures/certs/generated/server_from_root-key-pkcs8.pem +50 -50
- data/spec/fixtures/certs/generated/server_from_root.jks +0 -0
- data/spec/fixtures/certs/generated/server_from_root.key.pem +50 -50
- data/spec/fixtures/certs/generated/server_from_root.key.pkcs8.pem +52 -52
- data/spec/fixtures/certs/generated/server_from_root.p12 +0 -0
- data/spec/fixtures/certs/generated/server_from_root.pem +28 -28
- data/spec/fixtures/certs/generated/untrusted.key.pem +50 -50
- data/spec/fixtures/certs/generated/untrusted.pem +28 -28
- data/spec/unit/full_transmission_spec.rb +48 -0
- data/spec/unit/logstash_output_spec.rb +1 -0
- metadata +2 -2
@@ -106,6 +106,54 @@ describe 'Logstash Output -> Input complete transmission' do
|
|
106
106
|
include_examples "large sequence"
|
107
107
|
end
|
108
108
|
|
109
|
+
context 'event decoration' do
|
110
|
+
let(:output_config) { {"hosts" => "127.0.0.1:#{port}", "ssl_enabled" => false} }
|
111
|
+
let(:input_config) { {"host" => "127.0.0.1", "port" => port, "ssl_enabled" => false} }
|
112
|
+
|
113
|
+
let(:output_plugin) { LogStash::Outputs::Logstash.new(output_config) }
|
114
|
+
let(:input_plugin) { LogStash::Inputs::Logstash.new(input_config) }
|
115
|
+
|
116
|
+
let(:event_count) { 10 }
|
117
|
+
let(:input_events) { (0...event_count).map { |idx| LogStash::Event.new("event" => {"sequence" => idx}) } }
|
118
|
+
|
119
|
+
include_context 'transmission'
|
120
|
+
|
121
|
+
context "when configured with `tags` decorator" do
|
122
|
+
let(:input_config) { super().merge("tags" => %w(one-tag two-tag)) }
|
123
|
+
it 'applies the `tags` decoration' do
|
124
|
+
expect(output_events).to_not be_empty
|
125
|
+
# expect(output_events).to all(satisfy {|e| e.tags && Array(e.tags).include?('one-tag') && Array(e.tags).include?('two-tag') })
|
126
|
+
output_events.each do |output_event|
|
127
|
+
expect(output_event).to include 'tags'
|
128
|
+
expect(output_event.get('tags')).to include('one-tag').and(include('two-tag'))
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
context "when configured with `type` decorator" do
|
133
|
+
let(:input_config) { super().merge("type" => "fancy") }
|
134
|
+
it 'applies the `type` decoration' do
|
135
|
+
expect(output_events).to_not be_empty
|
136
|
+
# expect(output_events).to all(satisfy {|e| e.get('type')&.then{ |t| t && t == 'fancy'} })
|
137
|
+
output_events.each do |output_event|
|
138
|
+
expect(output_event).to include 'type'
|
139
|
+
expect(output_event.get('type')).to eq("fancy")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
context "when configured with `add_field`" do
|
144
|
+
let(:input_config) { super().merge("add_field" => {"my_field" => "field_value", "another_field" => "another-value"}) }
|
145
|
+
it 'applies the `add_field` decoration' do
|
146
|
+
expect(output_events).to_not be_empty
|
147
|
+
output_events.each do |output_event|
|
148
|
+
expect(output_event).to include 'my_field'
|
149
|
+
expect(output_event.get('my_field')).to eq("field_value")
|
150
|
+
expect(output_event).to include 'another_field'
|
151
|
+
expect(output_event.get('another_field')).to eq("another-value")
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
109
157
|
context 'simple ssl with client authentication none' do
|
110
158
|
let(:input_plugin) {
|
111
159
|
LogStash::Inputs::Logstash.new({
|
@@ -21,6 +21,7 @@ describe LogStash::Outputs::Logstash do
|
|
21
21
|
it { is_expected.to be_a_kind_of Class }
|
22
22
|
it { is_expected.to be <= LogStash::Outputs::Base }
|
23
23
|
it { is_expected.to have_attributes(:config_name => "logstash") }
|
24
|
+
it { is_expected.to have_attributes(:concurrency => :shared) }
|
24
25
|
end
|
25
26
|
|
26
27
|
describe "a plugin instance with minimal config" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-integration-logstash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|