-
Couldn't load subscription status.
- Fork 56
Fix iosxr integration test failures #571
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with the test fixes just some comments for clarification.
| from lxml import etree | ||
|
|
||
| HAS_XML = True | ||
| HAS_LXML = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change needed?
And this doesnot look like just test fixes.
Do we have a issue or ticket tracking this change?
Also, we would need a changelog if this change is relevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so running all integration tests locally i have faced SSH connection issues, especially with these modules:
iosxr_banner
iosxr_system
iosxr_user
the existing error management complicates the process of identifying whether these are -
Authentic SSHor any network problems
Missing or incompatible library dependencies like ncclient or lxml
so what this change achieve like it helps collecting complete traceback of ncclient and lxml import errors
including xml.etree.Element as a backup when lxml encounter problems
and also employing missing_required_lib to get uniform error messages
| module.fail_json(msg="ncclient is not installed") | ||
| if not HAS_XML: | ||
| module.fail_json(msg="lxml is not installed") | ||
| module.fail_json( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is good.
| HAS_NCCLIENT = True | ||
| except ImportError: | ||
| HAS_NCCLIENT = False | ||
| NCCLIENT_IMP_ERR = traceback.format_exc() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is expected?
SUMMARY
Fixed multiple integration test failures in cisco.iosxr collection to ensure code changes don't break device functionality.