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

Fix validate misbehavior in cucumber tests #835

Merged
merged 3 commits into from
Nov 7, 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
2 changes: 1 addition & 1 deletion model-lddtool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
<dependency>
<groupId>gov.nasa.pds</groupId>
<artifactId>validate</artifactId>
<version>3.6.0-SNAPSHOT</version>
<version>3.7.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
7 changes: 3 additions & 4 deletions model-lddtool/src/test/java/cucumber/ValidateStepDefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ public void execute_a_validate_command(String commandArgs) {
// [], we have to
// convert this.commandArgs into an array of strings.
String[] args = this.resolveArgumentStrings(commandArgs);

this.launcher.processMain(args);

this.tearDown();

// Will do the compare of the report in another function.
Expand Down Expand Up @@ -248,8 +246,9 @@ public void produced_output_from_validate_command_should_be_similar_to_reference
+ this.refOutputValue);

// Compare the count from this test with the this.messageCount from test table.
assertEquals(count, this.messageCount, this.messageText + " " + reportJson.toString());

assertEquals(this.messageCount, count, this.messageText + " " + reportJson.toString());
assertEquals(0, this.getMessageCountBasedOnProblemType("INTERNAL_ERROR,ARRAY_INTERNAL_ERROR,TABLE_INTERNAL_ERROR", reportJson),
"Required that internal errors do not occur.");
} catch (ExitException e) {
assertEquals(0, e.status, "Exit status");
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: Running integration tests for validate module

| "NASA-PDS/pds4-information-model#795 Test Schematron 2" | "github795b" | 1 | "1 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github795b/" | "" |

#| "NASA-PDS/pds4-information-model#797 Test Schematron 1" | "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#797 Test Schematron 1" | "github797" | 3 | "3 errors expected" | "SCHEMATRON_ERROR" | "--target {resourceDir}/github797/test_label1_FAIL.xml {resourceDir}/github797/u5.xml" | "PDS4_GEOM_IngestLDD.xml" |