Don't do karaf verifier by default

This commit is contained in:
James Agnew 2018-05-16 14:24:55 -04:00
parent d29a9a7f96
commit 0b6a146945
2 changed files with 55 additions and 36 deletions

View File

@ -411,11 +411,7 @@ public class FhirInstanceValidatorR4Test {
ourLog.info("Took {} ms -- {}ms / pass", delay, per);
}
/**
* // TODO: reenable
*/
@Test
@Ignore
public void testValidateBuiltInProfiles() throws Exception {
org.hl7.fhir.r4.model.Bundle bundle;
String name = "profiles-resources";
@ -444,11 +440,16 @@ public class FhirInstanceValidatorR4Test {
ValidationResult output = myVal.validateWithResult(next);
List<SingleValidationMessage> errors = logResultsAndReturnNonInformationalOnes(output);
// This isn't a validator problem but a definition problem.. it should get fixed at some point and
// we can remove this
if (next.getId().equalsIgnoreCase("http://hl7.org/fhir/OperationDefinition/StructureDefinition-generate")) {
// // This isn't a validator problem but a definition problem.. it should get fixed at some point and
// // we can remove this
// if (next.getId().equalsIgnoreCase("http://hl7.org/fhir/OperationDefinition/StructureDefinition-generate")) {
// assertEquals(1, errors.size());
// assertEquals("A search type can only be specified for parameters of type string [searchType implies type = 'string']", errors.get(0).getMessage());
// continue;
// }
if (next.getId().equalsIgnoreCase("http://hl7.org/fhir/OperationDefinition/StructureDefinition-snapshot")) {
assertEquals(1, errors.size());
assertEquals("A search type can only be specified for parameters of type string [searchType implies type = 'string']", errors.get(0).getMessage());
assertEquals("A search type can only be specified for parameters of type string [searchType.exists() implies type = 'string']", errors.get(0).getMessage());
continue;
}

View File

@ -185,34 +185,52 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${apache_karaf_version}</version>
<configuration>
<descriptors>
<descriptor>file://${project.build.directory}/classes/${features.file}</descriptor>
<descriptor>mvn:org.apache.karaf.features/enterprise/${apache_karaf_version}/xml/features</descriptor>
</descriptors>
<distribution>org.apache.karaf.features:framework</distribution>
<javase>1.8</javase>
<framework>
<feature>framework</feature>
</framework>
<features>
<feature>hapi-fhir*</feature>
</features>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>process-resources</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!--
The karaf verification step doesn't happen by default
because it doesn't seem to work on Windows.
See https://github.com/jamesagnew/hapi-fhir/issues/921
-->
<profile>
<id>DIST</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${apache_karaf_version}</version>
<configuration>
<descriptors>
<descriptor>file://${project.build.directory}/classes/${features.file}</descriptor>
<descriptor>mvn:org.apache.karaf.features/enterprise/${apache_karaf_version}/xml/features</descriptor>
</descriptors>
<distribution>org.apache.karaf.features:framework</distribution>
<javase>1.8</javase>
<framework>
<feature>framework</feature>
</framework>
<features>
<feature>hapi-fhir*</feature>
</features>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>process-resources</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>