Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(anta): Added the test case for verify BGP peer group of the BGP IPv4 peer(s) #815

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

vitthalmagadum
Copy link
Collaborator

Description

Verifies BGP peer group of the BGP IPv4 peer(s).

Expected Results
----------------
* Success: The test will pass if the peer group is correctly assigned to the BGP peer(s).
* Failure: The test will fail if the BGP peer group not correctly assigned or peer is not configured.

Fixes #810

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

Comment on lines 1461 to 1496
peer = command.params.peer
vrf = command.params.vrf
peer_group = input_entry.peer_group
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can collect the peer and vrf from input_entry

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

failure_log = f"Expected `{peer_group}` as the configured peer-group, but found `{actual_peer_group}` instead."
if not actual_peer_group:
failure_log = "Peer-group not configured."
failures[peer] = failure_log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so when peer not configured we are giving the vrf information but while it is not correct we are missing it to add vrf information. Please correct it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Thanks!!

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

examples/tests.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@MaheshGSLAB MaheshGSLAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the pre-commit by disable the line warning issue

Copy link

sonarcloud bot commented Oct 7, 2024

Copy link

codspeed-hq bot commented Oct 7, 2024

CodSpeed Performance Report

Merging #815 will not alter performance

Comparing vitthalmagadum:issue_810 (459b4ff) with main (29e08cb)

Summary

✅ 4 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the test case to verify BGP peer group
2 participants