Skip to content

Commit

Permalink
Fix the unit test afte merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vitthalmagadum committed Nov 15, 2024
1 parent b66f090 commit 5ad4b4e
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions tests/units/anta_tests/routing/test_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,76 @@ def test_check_bgp_neighbor_capability(input_dict: dict[str, bool], expected: bo
],
},
},
{
"name": "failure-wrong-count-peer-state-check-true",
"test": VerifyBGPPeerCount,
"eos_data": [
{
"vrfs": {
"default": {
"vrf": "default",
"routerId": "10.1.0.3",
"asn": "65120",
"peers": {
"10.1.0.1": {
"peerState": "Established",
"peerAsn": "65100",
"ipv4MplsVpn": {"afiSafiState": "advertised", "nlrisReceived": 0, "nlrisAccepted": 0},
"l2VpnEvpn": {"afiSafiState": "negotiated", "nlrisReceived": 42, "nlrisAccepted": 42},
},
"10.1.0.2": {
"peerState": "Established",
"peerAsn": "65100",
"ipv4MplsVpn": {"afiSafiState": "advertised", "nlrisReceived": 0, "nlrisAccepted": 0},
"l2VpnEvpn": {"afiSafiState": "negotiated", "nlrisReceived": 42, "nlrisAccepted": 42},
},
"10.1.254.1": {
"peerState": "Established",
"peerAsn": "65120",
"ipv4Unicast": {"afiSafiState": "negotiated", "nlrisReceived": 17, "nlrisAccepted": 17},
},
"10.1.255.0": {
"peerState": "Established",
"peerAsn": "65100",
"ipv4Unicast": {"afiSafiState": "negotiated", "nlrisReceived": 14, "nlrisAccepted": 14},
},
"10.1.255.2": {
"peerState": "Established",
"peerAsn": "65100",
"ipv4Unicast": {"afiSafiState": "negotiated", "nlrisReceived": 14, "nlrisAccepted": 14},
},
},
},
"DEV": {
"vrf": "DEV",
"routerId": "10.1.0.3",
"asn": "65120",
"peers": {
"10.1.254.1": {
"peerState": "Established",
"peerAsn": "65120",
"ipv4Unicast": {"afiSafiState": "negotiated", "nlrisReceived": 4, "nlrisAccepted": 4},
}
},
},
}
},
],
"inputs": {
"address_families": [
{"afi": "evpn", "num_peers": 3, "check_peer_state": True},
{"afi": "ipv4", "safi": "unicast", "vrf": "default", "num_peers": 3, "check_peer_state": True},
{"afi": "ipv4", "safi": "unicast", "vrf": "DEV", "num_peers": 2, "check_peer_state": True},
]
},
"expected": {
"result": "failure",
"messages": [
"AFI: evpn - Expected: 3, Actual: 2",
"AFI: ipv4 SAFI: unicast VRF: DEV - Expected: 2, Actual: 1",
],
},
},
{
"name": "failure-wrong-count",
"test": VerifyBGPPeerCount,
Expand Down

0 comments on commit 5ad4b4e

Please sign in to comment.