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

Add test cases for #753, #784, #794, #795, #829, #831 #844

Merged
merged 9 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions model-lddtool/src/test/resources/features/validate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ Feature: pds4_information_model_integration
# NOTE: The following flags are prepended to the execution by default: --disable-context-mismatch-warnings --report-style json --skip-content-validation --report-file {reportDir}/

@v15.2.x
#note: 'mvn test' choks if problem enum is blank or "" even if 0 messages
Examples:
| testId | testName | testDir | messageCount | messageText | problemEnum | commandArgs | ingestLDDFileName |
| "NASA-PDS/pds4-information-model#795a" | "Expected reference_type Failures for all Data Types" | "github795" | 9 | "9 errors expected" | "SCHEMATRON_ERROR" | "--rule pds4.bundle --target {resourceDir}/github795/" | "" |

| "NASA-PDS/pds4-information-model#795b"| "Expected reference_type Failure for Product_External" | "github795b" | 1 | "1 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github795b/" | "" |

| "NASA-PDS/pds4-information-model#797" | "Expected schematron failure for kernel_type values" | "github797" | 3 | "3 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github797/test_label1_FAIL.xml {resourceDir}/github797/u5.xml" | "PDS4_GEOM_IngestLDD.xml" |

| "NASA-PDS/pds4-information-model#816" | "Expected failure for Product_External LID formation rule" | "github816" | 1 | "1 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github816/" | "" |

| testId | testName | testDir | messageCount | messageText | problemEnum | commandArgs | ingestLDDFileName |
| "NASA-PDS/pds4-information-model#753" | "new Current units nA microA" | "github753" | 0 | "0 errors expected" | "SCHEMATRON_ERROR" | "-t {resourceDir}/github753/pc__d139.xml" | "PDS4_MARS2020_IngestLDD.xml" |
| "NASA-PDS/pds4-information-model#784a" | "Encoded_Video for Product_Ancillary" | "github784a" | 0 | "0 errors expected" | "SCHEMATRON_ERROR" | "-t {resourceDir}/github784/FUV2017032anc.xml" | "" |
| "NASA-PDS/pds4-information-model#784b" | "Encoded_Video for Product_Browse" | "github784b" | 0 | "0 errors expected" | "SCHEMATRON_ERROR" | "-t {resourceDir}/github784/FUV2017032brw.xml" | "" |
| "NASA-PDS/pds4-information-model#794" | "new namespace vikinglander" | "github794" | 0 | "0 errors expected" | "SCHEMATRON_ERROR" | "-t {resourceDir}/github794/ORB_35_STAR_SCANNER.xml" | "PDS4_VIKINGLANDER_IngestLDD.xml" |
| "NASA-PDS/pds4-information-model#795a" | "reference_type Failures for all Data Types" | "github795" | 10 | "10 errors expected" | "SCHEMATRON_ERROR,INTERNAL_ERROR" | "-R pds4.bundle -t {resourceDir}/github795" | "" |
| "NASA-PDS/pds4-information-model#795b" | "reference_type Failures for Product_External" | "github795b" | 2 | "2 errors expected" | "SCHEMATRON_ERROR" | "-t {resourceDir}/github795b/occultation_prediction_som_manifest.xml" | "" |
| "NASA-PDS/pds4-information-model#797" | "test schematron for kernel_type checks" | "github797" | 3 | "3 errors expected" | "SCHEMATRON_ERROR" | "-t {resourceDir}/github797/test_label1_FAIL.xml {resourceDir}/github797/u5.xml" | "PDS4_GEOM_IngestLDD.xml" |
| "NASA-PDS/pds4-information-model#829" | "new unit mrad/pixels" | "github829" | 0 | "0 errors expected" | "SCHEMATRON_ERROR" | "-t {resourceDir}/github829/ORB_35_STAR_SCANNER.xml" | "PDS4_HST_IngestLDD.xml" |
| "NASA-PDS/pds4-information-model#831" | "add Array_1D_Spectrum" | "github831" | 0 | "0 errors expected" | "SCHEMATRON_ERROR" | "-t {resourceDir}/github831/" | "" |


44 changes: 44 additions & 0 deletions model-lddtool/src/test/resources/github753/00notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
I assume I should get the IngestLDD file from
https://github.com/pds-data-dictionaries/ldd-hst


% validate -x *xsd -S *sch -t ORB_35_STAR_SCANNER.xml
Configuration:
Version 3.6.0-SNAPSHOT
Date 2024-10-14T21:11:53Z
Parameters:
Targets [file:/Users/rchen/Desktop/794/ORB_35_STAR_SCANNER.xml]
Severity Level WARNING
Recurse Directories true
File Filters Used [*.xml, *.XML]
Data Content Validation on
Product Level Validation on
Max Errors 100000
Registered Contexts File /Users/rchen/PDS4tools/validate/resources/registered_context_products.json
Product Level Validation Results
PASS: file:/Users/rchen/Desktop/794/ORB_35_STAR_SCANNER.xml
1 product validation(s) completed
Summary:
1 product(s)
0 error(s)
0 warning(s)
Product Validation Summary:
1 product(s) passed
0 product(s) failed
0 product(s) skipped
1 product(s) total
Referential Integrity Check Summary:
0 check(s) passed
0 check(s) failed
0 check(s) skipped
0 check(s) total
End of Report
Completed execution in 2379 ms
%
%
% grep vikinglander: ORB_35_STAR_SCANNER.xml
<vikinglander:Viking_Lander_Parameters>
<vikinglander:Observation_Information>
<vikinglander:observation_name>testtesttesttest</vikinglander:observation_name>
</vikinglander:Observation_Information>
</vikinglander:Viking_Lander_Parameters>
Loading