Skip to content

Commit

Permalink
[bgp_facts]: add back the bgpmon checks (#2490)
Browse files Browse the repository at this point in the history
The test code to validate the STATE_DB BGP state was removed inverdently in one of the earlier commit.
Adding it back in this PR

Signed-off-by: Arvindsrinivasan Lakshminarasimhan <[email protected]>
  • Loading branch information
arlakshm authored Nov 9, 2020
1 parent 8d8c198 commit c087041
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/bgp/test_bgp_fact.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def test_bgp_facts(duthosts, dut_hostname, asic_index):
assert v['state'] == 'established'
# Verify local ASNs in bgp sessions
assert v['local AS'] == int(config_facts['DEVICE_METADATA']['localhost']['bgp_asn'].decode("utf-8"))
# Check bgpmon functionality by validate STATE DB contains this neighbor as well
state_fact = duthost.shell('sonic-db-cli STATE_DB HGET "NEIGH_STATE_TABLE|{}" "state"'.format(k), module_ignore_errors=False)['stdout_lines']
assert state_fact[0] == "Established"

for k, v in config_facts['BGP_NEIGHBOR'].items():
# Compare the bgp neighbors name with config db bgp neighbors name
Expand Down

0 comments on commit c087041

Please sign in to comment.