Remove fhir-test-cases from Validator CLI JAR (#1497)
* WIP drop fhir-test-cases from CLI jar * Fix missing JUnit4 tests, update to JUnit5 where possible * Fix unused import * Include hamcrest dependency * Fix breaking ValidationEngineTests * Give kinder error message for missing param
This commit is contained in:
parent
37a8373b94
commit
698849b9f2
|
@ -1,6 +1,8 @@
|
||||||
package org.hl7.fhir.utilities;
|
package org.hl7.fhir.utilities;
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
|
|
@ -76,14 +76,6 @@
|
||||||
option need to be included here.
|
option need to be included here.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hl7.fhir.testcases</groupId>
|
|
||||||
<artifactId>fhir-test-cases</artifactId>
|
|
||||||
<version>${validator_test_case_version}</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>org.hl7.fhir.utilities</artifactId>
|
<artifactId>org.hl7.fhir.utilities</artifactId>
|
||||||
|
@ -220,14 +212,6 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.thymeleaf</groupId>
|
|
||||||
<artifactId>thymeleaf</artifactId>
|
|
||||||
<version>3.1.2.RELEASE</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>-->
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.everit.json</groupId>
|
<groupId>org.everit.json</groupId>
|
||||||
<artifactId>org.everit.json.schema</artifactId>
|
<artifactId>org.everit.json.schema</artifactId>
|
||||||
|
@ -264,6 +248,20 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest-library</artifactId>
|
||||||
|
<version>${hamcrest_version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
<artifactId>hamcrest</artifactId>
|
||||||
|
<version>${hamcrest_version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- /org.hl7.fhir.core test-jar dependencies -->
|
<!-- /org.hl7.fhir.core test-jar dependencies -->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -271,6 +269,7 @@
|
||||||
org.hl7.fhir.utilities (and others) but are required for the CLI to work,
|
org.hl7.fhir.utilities (and others) but are required for the CLI to work,
|
||||||
so we explicitly bring them in here.
|
so we explicitly bring them in here.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.qos.logback</groupId>
|
<groupId>ch.qos.logback</groupId>
|
||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
|
|
|
@ -40,6 +40,11 @@ public class TestsTask extends StandaloneTask{
|
||||||
final String testModuleParam = Params.getParam(args, Params.TEST_MODULES);
|
final String testModuleParam = Params.getParam(args, Params.TEST_MODULES);
|
||||||
final String testClassnameFilter = Params.getParam(args, Params.TEST_NAME_FILTER);
|
final String testClassnameFilter = Params.getParam(args, Params.TEST_NAME_FILTER);
|
||||||
final String testCasesDirectory = Params.getParam(args, Params.TEST);
|
final String testCasesDirectory = Params.getParam(args, Params.TEST);
|
||||||
|
if (testCasesDirectory == null) {
|
||||||
|
System.out.println("No fhir-test-cases directory provided. Required usage: -tests <fhir-test-cases-directory>");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
final String txCacheDirectory = Params.getParam(args, Params.TERMINOLOGY_CACHE);
|
final String txCacheDirectory = Params.getParam(args, Params.TERMINOLOGY_CACHE);
|
||||||
assert TestExecutorParams.isValidModuleParam(testModuleParam) : "Invalid test module param: " + testModuleParam;
|
assert TestExecutorParams.isValidModuleParam(testModuleParam) : "Invalid test module param: " + testModuleParam;
|
||||||
final String[] moduleNamesArg = TestExecutorParams.parseModuleParam(testModuleParam);
|
final String[] moduleNamesArg = TestExecutorParams.parseModuleParam(testModuleParam);
|
||||||
|
|
|
@ -17,5 +17,9 @@ public class TestModules {
|
||||||
VALIDATION_MODULE
|
VALIDATION_MODULE
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final List<String> JUNIT4_CLASSNAMES = Arrays.asList("org.hl7.fhir.validation.tests.ValidationTests", "org.hl7.fhir.terminologies.tests.TerminologyServiceTests");
|
public static final List<String> JUNIT4_CLASSNAMES = Arrays.asList(
|
||||||
|
"org.hl7.fhir.terminology.tests.LocalTerminologyServiceTests",
|
||||||
|
"org.hl7.fhir.validation.tests.ValidationTests",
|
||||||
|
"org.hl7.fhir.terminology.tests.ExternalTerminologyServiceTests",
|
||||||
|
"org.hl7.fhir.terminology.tests.TerminologyServiceTests");
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,9 @@ import org.hl7.fhir.r5.context.IWorkerContext;
|
||||||
import org.hl7.fhir.r5.terminologies.client.ITerminologyClient;
|
import org.hl7.fhir.r5.terminologies.client.ITerminologyClient;
|
||||||
import org.hl7.fhir.utilities.VersionUtil;
|
import org.hl7.fhir.utilities.VersionUtil;
|
||||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
|
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
|
||||||
import org.junit.Test;
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
public class ValidationEngineTests {
|
public class ValidationEngineTests {
|
||||||
|
|
||||||
// private static final String DEF_TX = FhirSettings.getTxFhirDevelopment();
|
private static final String DEF_TX = FhirSettings.getTxFhirDevelopment();
|
||||||
private static final String DEF_TX = FhirSettings.getTxFhirLocal();
|
//private static final String DEF_TX = FhirSettings.getTxFhirLocal();
|
||||||
|
|
||||||
public static boolean inbuild;
|
public static boolean inbuild;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue