-
Notifications
You must be signed in to change notification settings - Fork 123
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
Improved ExtractionTest Validation of Attachment and Extracted Children Expected vs Found Count #188
Improved ExtractionTest Validation of Attachment and Extracted Children Expected vs Found Count #188
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.
lgtm - just need to fix the import statements
ddcd129
to
4419433
Compare
This seems way more burdensome than the original ask, which was "don't allow the XML to have more child attachment or extractedRecord elements than specified in the As currently implemented, we can no longer assert the numAttachments or extractionCount without creating a child element for every one of those children. That could cause an enormous burden for downstream integration. and it will actively hinder extraction tests for some packaged file processing. If nothing else, the ExtractionTest class should provide the ability to disable this check on a class-by-class or test-by-test basis so downstream projects can integrate this version of emissary without requiring a huge integration PR with thousands of lines of new XML. |
0458b20
to
d0e5d9a
Compare
d0e5d9a
to
85c96bb
Compare
@drivenflywheel @dev-mlb some major updates within this. Instead of having it fail if If you guys would prefer that method however, I can move it inside of those ifs, and in the future if we want to build back out the functionality to fail if the counts do not match, we can. |
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.
Last changes? 🤞
@drivenflywheel made the suggested changes, had to make some slight changes to the assertion things to make it work like how it did when it was just logging |
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.
Looks good. Sorry for the high number cycles.
…en Expected vs Found Count. Added 3 more tests to TestExtractionTest to further tests.
…ld be covered now and should throw the correct error in each case. Added more tests to verify errors being thrown in each case. Removed two of the previous testing xmls, created a new, simpler xml for testing
0359641
to
8efa6fd
Compare
rebased and made some minor updates to just include the test name when validation finds expected vs found count not equal on assertion, hopefully this can close this PR 🤞 |
4e39266
Changes made by request of @jpdahlke
|
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 think this update makes sense given our integration experiences.
This is in reference to NationalSecurityAgency/burrito-grande#884.
Improved the ExtractionTest to further checks on Attachment and Extracted Children counts. Includes new tests in TestExtractionTest to verify count check works.