Module: check_mk
Branch: master
Commit: c7575232f3cb97e522057f81a75dc8a99dc44506
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c7575232f3cb97…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Sun Feb 10 09:56:25 2019 +0100
Add some integration tests for SNMP modules
We really want to test the SNMP implementations communicating against a
SNMP agent and the "netsnmp" python module (used for inline SNMP) and
snmp commands (used for classic SNMP) are not available in the git
environment. For the moment it does not make sense to build these tests
as unit tests because we want to tests the whole chain from single SNMP
actions in our modules to the faked SNMP device and back.
We use the snmpsimd (thanks Ilya! :-)) for simulating SNMP agents
providing different sets of SNMP information.
The tests invoke various calls using our different SNMP backends: SNMP
classic (based on snmp commands subprocesses), Inline SNMP (based on
netsnmp python bindings) and also get data from Check_MKs stored SNMP
walks.
For internal and more detailed testing we'll use unit tests instead.
Change-Id: I61e98d748220374b341f838c30617ca6043f1487
---
Pipfile | 1 +
cmk_base/snmp.py | 1 +
omd/packages/python-modules/python-modules.make | 1 +
.../python-modules/src/snmpsim-0.4.6.tar.gz | Bin 0 -> 414473 bytes
.../snmp/snmp_data/1.3.6.1.6.1.1.0.snmprec | 1 +
.../snmp_data/1.3.6.1.6.1.1.0/127.0.0.1.snmprec | 1 +
.../cmk_base/snmp/snmp_data/cmk-walk/localhost | 555 +++++++++++++++++++
.../cmk_base/snmp/snmp_data/public.snmprec | 614 +++++++++++++++++++++
tests/integration/cmk_base/snmp/test_snmp.py | 420 ++++++++++++++
9 files changed, 1594 insertions(+)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=c7575232f3…