Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test Failure] Tests are failing on Logstash 8.x #35

Closed
robbavey opened this issue Jun 8, 2022 · 1 comment
Closed

[Test Failure] Tests are failing on Logstash 8.x #35

robbavey opened this issue Jun 8, 2022 · 1 comment

Comments

@robbavey
Copy link

robbavey commented Jun 8, 2022

SNMP unit tests are failing on Logstash 8.x, likely due to ECS compatibility set by default

snmp_ls     | Failures:
snmp_ls     | 
snmp_ls     |   1) LogStash::Inputs::Snmp two plugins on different hosts with snmpv3 with same security name with different credentials and mix of udp and tcp behaves like snmp plugin return one udp event and one tcp event should have one udp from snmp1 and one tcp from snmp2
snmp_ls     |      Failure/Error: expect(event.get("[@metadata][host_protocol]")).to eq("tcp")
snmp_ls     |      
snmp_ls     |        expected: "tcp"
snmp_ls     |             got: nil
snmp_ls     |      
snmp_ls     |        (compared using ==)
snmp_ls     |      Shared Example Group: "snmp plugin return one udp event and one tcp event" called from ./spec/inputs/integration/it_spec.rb:188
snmp_ls     |      # ./spec/inputs/integration/it_spec.rb:36:in `block in /usr/share/plugins/plugin/spec/inputs/integration/it_spec.rb'
snmp_ls     |      # ./spec/inputs/integration/it_spec.rb:28:in `block in /usr/share/plugins/plugin/spec/inputs/integration/it_spec.rb'
snmp_ls     | 
snmp_ls     |   2) LogStash::Inputs::Snmp single input plugin on single server with snmpv2 and mix of udp and tcp should return two events 
snmp_ls     |      Failure/Error: expect(host_cnt_snmp1).to eq(2)
snmp_ls     |      
snmp_ls     |        expected: 2
snmp_ls     |             got: 0
snmp_ls     |      
snmp_ls     |        (compared using ==)
snmp_ls     |      # ./spec/inputs/integration/it_spec.rb:97:in `block in <main>'
snmp_ls     | 
snmp_ls     |   3) LogStash::Inputs::Snmp multiple plugin inputs and mix of udp tcp hosts behaves like snmp plugin return one udp event and one tcp event should have one udp from snmp1 and one tcp from snmp2
snmp_ls     |      Failure/Error: expect(event.get("[@metadata][host_protocol]")).to eq("tcp")
snmp_ls     |      
snmp_ls     |        expected: "tcp"
snmp_ls     |             got: nil
snmp_ls     |      
snmp_ls     |        (compared using ==)
snmp_ls     |      Shared Example Group: "snmp plugin return one udp event and one tcp event" called from ./spec/inputs/integration/it_spec.rb:159
snmp_ls     |      # ./spec/inputs/integration/it_spec.rb:36:in `block in <main>'
snmp_ls     |      # ./spec/inputs/integration/it_spec.rb:28:in `block in <main>'
snmp_ls     | 
snmp_ls     |   4) LogStash::Inputs::Snmp single input plugin on multiple udp hosts should return two events, one per host
snmp_ls     |      Failure/Error: hosts = queue.map { |event| event.get("host") }.sort
snmp_ls     |      
snmp_ls     |      ArgumentError:
snmp_ls     |        comparison of Hash with Hash failed
snmp_ls     |      # ./spec/inputs/integration/it_spec.rb:110:in `block in <main>'
snmp_ls     | 
snmp_ls     |   5) LogStash::Inputs::Snmp multiple pipelines and mix of udp tcp hosts should return two events, one per host
snmp_ls     |      Failure/Error: hosts = [queue.pop, queue2.pop].map { |event| event.get("host") }.sort
snmp_ls     |      
snmp_ls     |      ArgumentError:
snmp_ls     |        comparison of Hash with Hash failed
snmp_ls     |      # ./spec/inputs/integration/it_spec.rb:140:in `block in <main>'
snmp_ls     | 
snmp_ls     | Finished in 49.7 seconds (files took 9.47 seconds to load)
snmp_ls     | 9 examples, 5 failures
snmp_ls     | 
snmp_ls     | Failed examples:
snmp_ls     | 
snmp_ls     | rspec './spec/inputs/integration/it_spec.rb[1:8:1:1]' # LogStash::Inputs::Snmp two plugins on different hosts with snmpv3 with same security name with different credentials and mix of udp and tcp behaves like snmp plugin return one udp event and one tcp event should have one udp from snmp1 and one tcp from snmp2
snmp_ls     | rspec ./spec/inputs/integration/it_spec.rb:88 # LogStash::Inputs::Snmp single input plugin on single server with snmpv2 and mix of udp and tcp should return two events 
snmp_ls     | rspec './spec/inputs/integration/it_spec.rb[1:7:1:1]' # LogStash::Inputs::Snmp multiple plugin inputs and mix of udp tcp hosts behaves like snmp plugin return one udp event and one tcp event should have one udp from snmp1 and one tcp from snmp2
snmp_ls     | rspec ./spec/inputs/integration/it_spec.rb:103 # LogStash::Inputs::Snmp single input plugin on multiple udp hosts should return two events, one per host
snmp_ls     | rspec ./spec/inputs/integration/it_spec.rb:122 # LogStash::Inputs::Snmp multiple pipelines and mix of udp tcp hosts should return two events, one per host
snmp_ls     | 
snmp_ls     | Randomized with seed 15116
@edmocosta
Copy link
Contributor

edmocosta commented May 3, 2024

Fixed

@edmocosta edmocosta transferred this issue from logstash-plugins/logstash-input-snmp May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants