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

Regression in validate no longer enabling CRLF to be embedded within a Table_Character record #593

Closed
jordanpadams opened this issue Jan 31, 2023 · 1 comment · Fixed by #594
Assignees
Labels
B13.1 bug Something isn't working i&t.done s.high

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Jan 31, 2023

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

Per updates for #519, added a regression for a failed test related to #325.

It appears that somewhere in the updates a regression was added where we are reading in Table_Character like Table_Delimited. So this special case (among probably others) are no longer handled correctly.

🕵️ Expected behavior

Validate successfully

📜 To Reproduce

Previously when running mvn test:

[ERROR] Execute validate command for tests below. #87  Time elapsed: 0.755 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 0 error messages expected. {"title":"PDS Validation Tool Report","configuration":{"version":"3.2.0-SNAPSHOT","date":"2023-01-30T22:02:41Z"},"parameters":{"targets":"[file:/Users/jpadams/proj/pds/pdsen/workspace/validate/src/test/resources/github325/crs009x.xml]","ruleType":"pds4.label","severityLevel":"WARNING","recurseDirectories":"true","fileFiltersUsed":"[*.xml, *.XML]","dataContentValidation":"on","productLevelValidation":"on","maxErrors":"100000","registeredContextsFile":"/Users/jpadams/proj/pds/pdsen/workspace/validate/src/main/resources/util/registered_context_products.json"},"productLevelValidationResults":[{"status":"FAIL","label":"file:/Users/jpadams/proj/pds/pdsen/workspace/validate/src/test/resources/github325/crs009x.xml","messages":[],"fragments":[],"dataContents":[{"dataFile":"file:/Users/jpadams/proj/pds/pdsen/workspace/validate/src/test/resources/github325/crs009x.tab","messages":[{"severity":"ERROR","type":"error.table.record_length_mismatch","table":1,"record":1,"message":"Delimiter is not at the end of the record. Record read using delimiter is 82 bytes long while record is defined to be 246 bytes."},{"severity":"ERROR","type":"error.table.record_length_mismatch","table":1,"record":2,"message":"Delimiter is not at the end of the record. Record read using delimiter is 82 bytes long while record is defined to be 246 bytes."}]}]}],"summary":{"totalProducts":1,"totalErrors":2,"totalWarnings":0,"messageTypes":[{"messageType":"error.table.record_length_mismatch","total":2}]}} ==> expected: <2> but was: <0>

Now, executing validate against that file in the repo, instead of the test executing successfully, we get 2 errors:

$ validate -t src/test/resources/github325/crs009x.xml

🖥 Environment Info

  • Version of this software [e.g. vX.Y.Z]
  • Operating System: [e.g. MacOSX with Docker Desktop vX.Y]
    ...

📚 Version of Software Used

No response

🩺 Test Data / Additional context

See repo path in execution above

🦄 Related requirements

No response

⚙️ Engineering Details

No response

@jordanpadams jordanpadams added bug Something isn't working needs:triage labels Jan 31, 2023
@jordanpadams jordanpadams changed the title Regression in validate enabling CRLF to be embedded within a Table_Character record Regression in validate no longer enabling CRLF to be embedded within a Table_Character record Jan 31, 2023
nutjob4life added a commit that referenced this issue Feb 14, 2023
issue #593: fix regression introduced to #325 integration tests
@miguelp1986
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B13.1 bug Something isn't working i&t.done s.high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants