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

refactor(anta.tests): Nicer result failure messages interface(part-2) test module  #1046

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

Conversation

geetanjalimanegslab
Copy link
Collaborator

@geetanjalimanegslab geetanjalimanegslab commented Feb 19, 2025

Nicer result failure messages Interface test module following testcases are covers.

  1. VerifyPortChannels
  2. VerifyIllegalLACP
  3. VerifyLoopbackCount
  4. VerifySVI
  5. VerifyL3MTU
  6. VerifyIPProxyARP

Fixes #587

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)

Copy link

codspeed-hq bot commented Feb 19, 2025

CodSpeed Performance Report

Merging #1046 will not alter performance

Comparing geetanjalimanegslab:fix_interface_module-2_failure_msg (ff4ab79) with main (9ba0284)

Summary

✅ 22 untouched benchmarks

@vitthalmagadum vitthalmagadum marked this pull request as ready for review February 24, 2025 10:13
Copy link
Contributor

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

@@ -1306,7 +1306,7 @@
},
],
"inputs": None,
"expected": {"result": "failure", "messages": ["The following port-channels have inactive port(s): ['Port-Channel42']"]},
"expected": {"result": "failure", "messages": ["Port-Channel: Port-Channel42 - Inactive port(s) - Ethernet8"]},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"expected": {"result": "failure", "messages": ["Port-Channel: Port-Channel42 - Inactive port(s) - Ethernet8"]},
"expected": {"result": "failure", "messages": ["Port-Channel42 - Inactive port(s) - Ethernet8"]},

@@ -1362,7 +1362,7 @@
"inputs": None,
"expected": {
"result": "failure",
"messages": ["The following port-channels have received illegal LACP packets on the following ports: [{'Port-Channel42': 'Ethernet8'}]"],
"messages": ["Port-Channel: Port-Channel42 Interface: Ethernet8 - Illegal LACP packets found"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

"expected": {
"result": "failure",
"messages": [
"Interface: Loopback666 LineProtocolStatus: up interfaceStatus: Connected - Not up - Actual: LineProtocolStatus: down InterfaceStatus: notconnect"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is confusing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi, @carl-baillargeon,
I have updated the above single failure message with two separated messages,

  1. incorrect Lineprotocolstatus
  2. incorrect Interface status
    Could you kindly review this and share your thoughts?

"expected": {
"result": "failure",
"messages": [
"SVI: Vlan42 LineProtocolStatus: up interfaceStatus: Connected - Not up - Actual: LineProtocolStatus: lowerLayerDown InterfaceStatus: notconnect"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing here. It's confusing. We should simplify this somehow.

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. please share your thoughts on the same, Thanks!

Copy link
Contributor

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

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.

Have nicer result failure messages
3 participants