updated test_bgp_fact.py to test bgpmon functionality #2241
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to add test to validate the functionality of bgpmon (BGP Monitor) Daemon created by PR (sonic-net/sonic-buildimage#5329) under the BGP docker.
This PR has a dependency on (sonic-net/sonic-buildimage#5329) and it should not be merged until the depended PR is merged first or else all new PRs that started to use this test changes will begin to fail since their changes would not have included the bgpmon running that this test is trying to validate.
For details on what bgpmon feature is about, please refer to PR (sonic-net/sonic-buildimage#5329).
Quick summary of bgpmon: To assist gathering BGP related information periodically based on BGP activity detection to store BGP Neighbor state information into State DB.
Dependency on the following PR:
Signed-off-by: Gen-Hwa Chiang gechiang@microsoft.com
- What I did
Since this test is already validating the expected BGP neighbors reaching the "established" state based on the bgpfact, for each of the expected peer we can add additional validation that its corresponding Neighbor peer state stored in STATE DB has also reached "established" state as well. if this entry is missing or the state is not what was expected, then bgpmon functionality is in question and needs to be investigated.
- How I did it
- How to verify it
Ran this new testcase against a DUT or as part of a VS Image that has bgpmon running. upon successful run the following output is expected (this is sample output of running against a DUT: