mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-10 10:21:31 +00:00
Merge pull request #7909 from pjdruddy/snmp-skip-test
test: add snmp skip test
This commit is contained in:
commit
ddbda04e87
@ -76,6 +76,11 @@ class TemplateTopo(Topo):
|
|||||||
|
|
||||||
def setup_module(mod):
|
def setup_module(mod):
|
||||||
"Sets up the pytest environment"
|
"Sets up the pytest environment"
|
||||||
|
|
||||||
|
# skip tests is SNMP not installed
|
||||||
|
if not os.path.isfile("/usr/sbin/snmpd"):
|
||||||
|
error_msg = "SNMP not installed - skipping"
|
||||||
|
pytest.skip(error_msg)
|
||||||
# This function initiates the topology build with Topogen...
|
# This function initiates the topology build with Topogen...
|
||||||
tgen = Topogen(TemplateTopo, mod.__name__)
|
tgen = Topogen(TemplateTopo, mod.__name__)
|
||||||
# ... and here it calls Mininet initialization functions.
|
# ... and here it calls Mininet initialization functions.
|
||||||
@ -120,7 +125,7 @@ def test_r1_bgp_version():
|
|||||||
"Wait for protocol convergence"
|
"Wait for protocol convergence"
|
||||||
tgen = get_topogen()
|
tgen = get_topogen()
|
||||||
|
|
||||||
#tgen.mininet_cli()
|
# tgen.mininet_cli()
|
||||||
r1 = tgen.net.get("r1")
|
r1 = tgen.net.get("r1")
|
||||||
r1_snmp = SnmpTester(r1, "1.1.1.1", "public", "2c")
|
r1_snmp = SnmpTester(r1, "1.1.1.1", "public", "2c")
|
||||||
assert r1_snmp.test_oid("bgpVersin", None)
|
assert r1_snmp.test_oid("bgpVersin", None)
|
||||||
|
Loading…
Reference in New Issue
Block a user