diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/interceptor/PublicSecurityInterceptor.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/interceptor/PublicSecurityInterceptor.java index 15614f2ecd4..f3011982d53 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/interceptor/PublicSecurityInterceptor.java +++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/interceptor/PublicSecurityInterceptor.java @@ -18,7 +18,7 @@ public class PublicSecurityInterceptor extends AuthorizationInterceptor { public PublicSecurityInterceptor() { String passwordsString = System.getProperty("fhir.tdlpass"); String[] passwords = passwordsString.split(","); - myTokens = new HashSet(Arrays.asList(passwords)); + myTokens = new HashSet<>(Arrays.asList(passwords)); ourLog.info("We have {} valid security tokens", myTokens.size()); } @@ -27,7 +27,6 @@ public class PublicSecurityInterceptor extends AuthorizationInterceptor { public List buildRuleList(RequestDetails theRequestDetails) { String authHeader = theRequestDetails.getHeader("Authorization"); - //@formatter:off if (isBlank(authHeader)) { return new RuleBuilder() .deny().operation().named(BaseJpaSystemProvider.MARK_ALL_RESOURCES_FOR_REINDEXING).onServer().andThen() @@ -35,8 +34,7 @@ public class PublicSecurityInterceptor extends AuthorizationInterceptor { .allowAll() .build(); } - //@formatter:off - + if (!authHeader.startsWith("Bearer ")) { throw new ForbiddenOperationException("Invalid bearer token, must be in the form \"Authorization: Bearer [token]\""); } diff --git a/pom.xml b/pom.xml index 706afe2186d..1a2c13f137b 100644 --- a/pom.xml +++ b/pom.xml @@ -1954,8 +1954,6 @@ hapi-deployable-pom hapi-fhir-base hapi-fhir-utilities - hapi-fhir-base-test-mindeps-client - hapi-fhir-base-test-mindeps-server hapi-tinder-plugin hapi-tinder-test hapi-fhir-client @@ -1990,6 +1988,8 @@ example-projects/hapi-fhir-standalone-overlay-example example-projects/hapi-fhir-jpaserver-cds-example example-projects/hapi-fhir-jpaserver-dynamic + tests/hapi-fhir-base-test-mindeps-client + tests/hapi-fhir-base-test-mindeps-server hapi-fhir-jacoco hapi-fhir-igpacks hapi-fhir-spring-boot diff --git a/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml similarity index 96% rename from hapi-fhir-base-test-mindeps-client/pom.xml rename to tests/hapi-fhir-base-test-mindeps-client/pom.xml index f5b2437dd8b..1df31b9ed08 100644 --- a/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -5,10 +5,10 @@ ca.uhn.hapi.fhir hapi-fhir 3.3.0-SNAPSHOT - ../pom.xml + ../../pom.xml - hapi-fhir-base-testmindeps-client + hapi-fhir-base-test-mindeps-client jar HAPI FHIR - Minimal Dependency Test - Client diff --git a/hapi-fhir-base-test-mindeps-client/src/test/java/ca/uhn/fhir/rest/client/ClientTest.java b/tests/hapi-fhir-base-test-mindeps-client/src/test/java/ca/uhn/fhir/rest/client/ClientTest.java similarity index 100% rename from hapi-fhir-base-test-mindeps-client/src/test/java/ca/uhn/fhir/rest/client/ClientTest.java rename to tests/hapi-fhir-base-test-mindeps-client/src/test/java/ca/uhn/fhir/rest/client/ClientTest.java diff --git a/hapi-fhir-base-test-mindeps-server/.gitignore b/tests/hapi-fhir-base-test-mindeps-server/.gitignore similarity index 100% rename from hapi-fhir-base-test-mindeps-server/.gitignore rename to tests/hapi-fhir-base-test-mindeps-server/.gitignore diff --git a/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml similarity index 94% rename from hapi-fhir-base-test-mindeps-server/pom.xml rename to tests/hapi-fhir-base-test-mindeps-server/pom.xml index a300729423e..77214e67bf0 100644 --- a/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -1,4 +1,4 @@ - 4.0.0 @@ -6,10 +6,10 @@ ca.uhn.hapi.fhir hapi-fhir 3.3.0-SNAPSHOT - ../pom.xml + ../../pom.xml - hapi-fhir-base-testmindeps-server + hapi-fhir-base-test-mindeps-server jar HAPI FHIR - Minimal Dependency Test - Server diff --git a/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java b/tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java similarity index 100% rename from hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java rename to tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java diff --git a/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/parser/MultiVersionXmlParserTest.java b/tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/parser/MultiVersionXmlParserTest.java similarity index 100% rename from hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/parser/MultiVersionXmlParserTest.java rename to tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/parser/MultiVersionXmlParserTest.java diff --git a/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/FhirContextTest.java b/tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/FhirContextTest.java similarity index 100% rename from hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/FhirContextTest.java rename to tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/FhirContextTest.java diff --git a/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/ReadTest.java b/tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/ReadTest.java similarity index 100% rename from hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/ReadTest.java rename to tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/ReadTest.java diff --git a/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/SetupTest.java b/tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/SetupTest.java similarity index 100% rename from hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/SetupTest.java rename to tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/SetupTest.java diff --git a/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/ValidatorTest.java b/tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/ValidatorTest.java similarity index 100% rename from hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/ValidatorTest.java rename to tests/hapi-fhir-base-test-mindeps-server/src/test/java/ca/uhn/fhir/testmindeps/ValidatorTest.java