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

Document that snmp package is needed for running tests #346

Open
johannaengland opened this issue Aug 13, 2024 · 1 comment
Open

Document that snmp package is needed for running tests #346

johannaengland opened this issue Aug 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@johannaengland
Copy link
Contributor

When I tried running the tests on a new Ubuntu installation the tests test_when_link_down_is_received_it_should_create_portstate_event, test_when_port_does_not_match_watch_pattern_it_should_ignore_link_traps and test_when_port_matches_ignore_pattern_it_should_ignore_link_traps from tests/trapobservers/link_traps_test.py failed with the following error

AssertionError: snmptrap command exited with error
assert 127 == 0
  + where 127 = <Process 47872>.returncode

I figured out that that was due to not having the snmp package installed.
It is easily fixed on Ubuntu using apt install snmp.

This should be documented in the running tests section of the README.
I don't know how this affects other OS'.

@johannaengland johannaengland added the bug Something isn't working label Aug 13, 2024
@lunkwill42
Copy link
Member

Agreed we should put this in the docs, but we should probably also skip tests that use snmp command line programs if they aren't available (I think skipping is a better strategy when the issue is not with the codebase, but with what's available in the test environment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants