tests: dont run ldp snmp test if no snmp

Signed-off-by: Christian Hopps <chopps@labn.net>
This commit is contained in:
Christian Hopps 2025-01-16 01:07:53 +00:00
parent b0f9c4d688
commit f71d5281ce

View File

@ -107,6 +107,11 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
if not os.path.isfile("/usr/sbin/snmpd"):
error_msg = "SNMP not installed - skipping"
pytest.skip(error_msg)
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()