Closed p-sherratt closed 2 years ago
Hi,
Verified the fix , here is the output after your fix .
~/jsnapy_issue_392/jsnapy/samples# jsnapy --check pre post -f config.yaml **** Device: 10.220.12.56 **** Tests Included: chassis_environment Command: show chassis environment Test FAILED: ./status before was < OK > now it is < None > Test FAILED: ./status before was < None > now it is < OK > Test FAILED: ./status before was < OK > now it is < None > Test FAILED: ./status before was < OK > now it is < None > Test FAILED: ./status before was < OK > now it is < None > Test FAILED: ./status before was < None > now it is < OK > Test FAILED: ./status before was < None > now it is < OK > Test FAILED: ./status before was < OK > now it is < None > Test FAILED: ./status before was < OK > now it is < None > Test FAILED: ./status before was < None > now it is < OK > Test FAILED: ./status before was < None > now it is < OK > Test FAILED: ./status before was < None > now it is < OK > FAIL | All "./status" is not same in pre and post snapshot [ 130 value matched / 12 value failed ] ------------------------------- Final Result!! ------------------------------- chassis_environment : Failed Total No of tests passed: 0 Total No of tests failed: 1 Overall Tests failed!!!
I believe from 1.3.7 this needs to be applied to lines: 2899 from None, to etree.Element("NoNode") 2917 from None, to etree.Element("NoNode")
Addressed in https://github.com/Juniper/jsnapy/pull/399
What does this PR do?
Fixes issue #394
Previous Behavior
None value is passed to
_get_nodevalue
in the case where a node cannot be foundNew Behavior
etree.Element("NoNode") is passed to
_get_nodevalue
Tests written?
No