-
Notifications
You must be signed in to change notification settings - Fork 58
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
Missing failure messages and ID gone missing error #364
Comments
I was thinking it could be useful if Jsnapy could check if there's a difference between the two snapshots for one single element, defined by the Xpath but without an id. It should be useful for simple cases like this, with only one XML node to check and no ID. |
This is essentially the same problem (regarding the way these comparators construct a key_unions element to compare two list) as I described in here But looking at the current state of this repo it seem like no one is willing to look into this. The resolution is actually not that difficult but there must be someone available to merge the fix if it's implemented. I'm trying to contact JTAC on this |
issue is not reproducible in the latest jsnapy , we will close this issue as fixed.
Thanks |
provided the pass logs in the above comment, hence closing this issue for now. |
Description of Issue/Question
I was diagnosing an issue in an application and I came across this behavior, which I don't know if it is intended or not. I have a simple test with pre and post snapshots that uses
no-diff
to compare the output of a command, in this example is "show configuration".Setup
I have a simple Python script to test this:
main.py
(note: the device is not used, I couldn't find a way to avoid passing one to the check method).
test.yml
pre_test.xml
post_test.xml
What I get from running this script is first this output from the logs, which I don't really understand why those "ids" are missing, or what does it mean:
The other thing is the result of
r[0].test_results
:It says I have two failed tests, when it's actually only one test (PRE and POST snapshots are different). Also those "missing ids" should have my error string which I specified in
test.yml
: "configuration differs".I found this strange because when PRE and POST are the same, I get the correct message and the correct number of tests reported:
It's a bit tedious to have these different formats for the output because I am trying to parse these results and have them displayed with some HTML along with the error message defined in the test.
Maybe I'm doing something wrong or using the library in an unintended way?
Any help will be appreciated. Thanks in advance.
Versions Report
I am using jsnapy 1.3.3 with Python 3.8.1
The text was updated successfully, but these errors were encountered: