Merge pull request #5034 from opensourcerouting/rm-topotest-cruft

tests: remove more topotest backward-compatibility cruft
This commit is contained in:
Donald Sharp 2019-09-23 15:52:32 -04:00 committed by GitHub
commit 5034c882bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 1 additions and 213 deletions

View File

@ -1,31 +0,0 @@
{
"neighbors":[
{
"2.2.2.2":[
{
"priority":1,
"state":"Full/DR",
"address":"10.0.1.2",
"ifaceName":"r1-eth1:10.0.1.1",
"retransmitCounter":0,
"requestCounter":0,
"dbSummaryCounter":0
}
]
},
{
"3.3.3.3":[
{
"priority":1,
"state":"Full/DR",
"address":"10.0.2.3",
"ifaceName":"r1-eth2:10.0.2.1",
"retransmitCounter":0,
"requestCounter":0,
"dbSummaryCounter":0
}
]
}
]
}

View File

@ -1,18 +0,0 @@
{
"2.2.2.2":[
{
"priority":1,
"state":"Full/DR",
"address":"10.0.1.2",
"ifaceName":"r1-eth1:10.0.1.1"
}
],
"3.3.3.3":[
{
"priority":1,
"state":"Full/DR",
"address":"10.0.2.3",
"ifaceName":"r1-eth2:10.0.2.1"
}
]
}

View File

@ -1,14 +0,0 @@
{
"2.2.2.2":{
"priority":1,
"state":"Full/DR",
"address":"10.0.1.2",
"ifaceName":"r1-eth1:10.0.1.1"
},
"3.3.3.3":{
"priority":1,
"state":"Full/DR",
"address":"10.0.2.3",
"ifaceName":"r1-eth2:10.0.2.1"
}
}

View File

@ -1,30 +0,0 @@
{
"neighbors":[
{
"1.1.1.1":[
{
"priority":1,
"state":"Full/Backup",
"address":"10.0.1.1",
"ifaceName":"r2-eth1:10.0.1.2",
"retransmitCounter":0,
"requestCounter":0,
"dbSummaryCounter":0
}
]
},
{
"3.3.3.3":[
{
"priority":1,
"state":"Full/DR",
"address":"10.0.3.3",
"ifaceName":"r2-eth2:10.0.3.2",
"retransmitCounter":0,
"requestCounter":0,
"dbSummaryCounter":0
}
]
}
]
}

View File

@ -1,18 +0,0 @@
{
"1.1.1.1":[
{
"priority":1,
"state":"Full/Backup",
"address":"10.0.1.1",
"ifaceName":"r2-eth1:10.0.1.2"
}
],
"3.3.3.3":[
{
"priority":1,
"state":"Full/DR",
"address":"10.0.3.3",
"ifaceName":"r2-eth2:10.0.3.2"
}
]
}

View File

@ -1,14 +0,0 @@
{
"1.1.1.1":{
"priority":1,
"state":"Full/Backup",
"address":"10.0.1.1",
"ifaceName":"r2-eth1:10.0.1.2"
},
"3.3.3.3":{
"priority":1,
"state":"Full/DR",
"address":"10.0.3.3",
"ifaceName":"r2-eth2:10.0.3.2"
}
}

View File

@ -1,30 +0,0 @@
{
"neighbors":[
{
"1.1.1.1":[
{
"priority":1,
"state":"Full/Backup",
"address":"10.0.2.1",
"ifaceName":"r3-eth1:10.0.2.3",
"retransmitCounter":0,
"requestCounter":0,
"dbSummaryCounter":0
}
]
},
{
"2.2.2.2":[
{
"priority":1,
"state":"Full/Backup",
"address":"10.0.3.2",
"ifaceName":"r3-eth2:10.0.3.3",
"retransmitCounter":0,
"requestCounter":0,
"dbSummaryCounter":0
}
]
}
]
}

View File

@ -1,18 +0,0 @@
{
"1.1.1.1":[
{
"priority":1,
"state":"Full/Backup",
"address":"10.0.2.1",
"ifaceName":"r3-eth1:10.0.2.3"
}
],
"2.2.2.2":[
{
"priority":1,
"state":"Full/Backup",
"address":"10.0.3.2",
"ifaceName":"r3-eth2:10.0.3.3"
}
]
}

View File

@ -1,14 +0,0 @@
{
"1.1.1.1":{
"priority":1,
"state":"Full/Backup",
"address":"10.0.2.1",
"ifaceName":"r3-eth1:10.0.2.3"
},
"2.2.2.2":{
"priority":1,
"state":"Full/Backup",
"address":"10.0.3.2",
"ifaceName":"r3-eth2:10.0.3.3"
}
}

View File

@ -144,9 +144,6 @@ def setup_module(mod):
)
tgen.start_router()
for router in router_list.values():
if router.has_version('<', '3'):
tgen.set_error('unsupported version')
def teardown_module(mod):
"Teardown the pytest environment"
@ -180,30 +177,8 @@ def test_ospf_convergence():
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
# Old output (before FRR PR1383) didn't show a list of neighbors.
# Check for dict object and compare to old output if this is the case
tgen = get_topogen()
router = tgen.gears['r1']
output = router.vtysh_cmd("show ip ospf neighbor json", isjson=True)
# We could have either old format (without "neighbors" and direct list
# of IP's or new format from PR1659 with "neighbors".
# Trying old formats first and fall back to new format
#
# New format: neighbors have dict instead of list of dicts (PR1723).
if output.has_key('neighbors'):
if isinstance(output['neighbors'], dict):
reffile = "show_ip_ospf_neighbor.json"
else:
reffile = "show_ip_ospf_neighbor.ref"
else:
if isinstance(output["2.2.2.2"], dict):
reffile = "show_ip_ospf_neighbor.ref-old-nolist"
else:
reffile = "show_ip_ospf_neighbor.ref-no-neigh"
for rname in ['r1', 'r2', 'r3']:
router_compare_json_output(rname, "show ip ospf neighbor json", reffile)
router_compare_json_output(rname, "show ip ospf neighbor json", "show_ip_ospf_neighbor.json")
def test_rib():
logger.info("Test: verify RIB")