logstash-input-reqsample 0.1.1 → 0.1.2
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/lib/logstash/inputs/reqsample.rb +1 -1
- data/logstash-input-reqsample.gemspec +1 -1
- data/spec/inputs/reqsample_spec.rb +19 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a139ba547768383c84752841402681efd6e2c83
|
4
|
+
data.tar.gz: 9265ef344aae6963e4f5137bee825ea91b7d426c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 817f73a90d1b2bd7c33b8a487ad98cd9355ec92b82764f2b515f47c9925183ef8fe2cfba2a778dbf110a162d4ce541c4ed1d3b6d0d56f388cd165ad1e9505052
|
7
|
+
data.tar.gz: a955e78e7127075215e5e86219e6b3400cb12c1b9bb9fdc89e856ef0f9f6a50c4f4f892ca1d27e6fc588847e22bca242401804a25e110e8d4c0c233aa39eac35
|
@@ -53,7 +53,7 @@ class LogStash::Inputs::Reqsample < LogStash::Inputs::Base
|
|
53
53
|
end # def register
|
54
54
|
|
55
55
|
def run(queue)
|
56
|
-
@generator.produce(@production_options).lazy do |log|
|
56
|
+
@generator.produce(@production_options).lazy.each do |log|
|
57
57
|
break if stop?
|
58
58
|
event = LogStash::Event.new('message' => log, 'host' => @host)
|
59
59
|
decorate(event)
|
@@ -3,4 +3,23 @@ require 'logstash/devutils/rspec/spec_helper'
|
|
3
3
|
require 'logstash/inputs/reqsample'
|
4
4
|
|
5
5
|
describe LogStash::Inputs::Reqsample do
|
6
|
+
describe 'simple configuration' do
|
7
|
+
let(:config) do
|
8
|
+
<<-CONFIG
|
9
|
+
input {
|
10
|
+
reqsample {
|
11
|
+
count => 10
|
12
|
+
}
|
13
|
+
}
|
14
|
+
CONFIG
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'generates events' do
|
18
|
+
expect(
|
19
|
+
input(config) do |_pipeline, queue|
|
20
|
+
Array.new(queue.size) { queue.pop }
|
21
|
+
end.size
|
22
|
+
).to eq 10
|
23
|
+
end
|
24
|
+
end
|
6
25
|
end
|