From e81a9de40bc0acb4a15ecf9fd60500a6f71344e4 Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Fri, 8 Oct 2021 14:08:59 +0200 Subject: Create a json schema for validation of the configuration of the A1 PMS - A1 Jakarta Enabling the feature by default and fixing so that the schema can be loaded from the jar. Issue-ID: CCSDK-3468 Signed-off-by: PatrikBuhr Change-Id: I49a41b9124b74d5019200cc9b6eb48c5d46b043d --- .../oran/a1policymanagementservice/MockPolicyManagementService.java | 3 ++- .../configuration/ApplicationConfigParserTest.java | 2 +- .../controllers/v2/ConfigurationControllerTest.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'a1-policy-management/src/test/java/org') diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/MockPolicyManagementService.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/MockPolicyManagementService.java index b0076405..3cb1d91d 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/MockPolicyManagementService.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/MockPolicyManagementService.java @@ -58,7 +58,8 @@ import org.springframework.util.StringUtils; @TestPropertySource(properties = { // "server.ssl.key-store=./config/keystore.jks", // "app.webclient.trust-store=./config/truststore.jks", // - "app.vardata-directory=./target"}) + "app.vardata-directory=./target", // + "app.config-file-schema-path=/application_configuration_schema.json"}) @SuppressWarnings("java:S3577") // Class name should start or end with Test. This is not a test class per se, // but a mock // of the server. diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParserTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParserTest.java index d12fd6bc..4a4e8a33 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParserTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParserTest.java @@ -55,7 +55,7 @@ class ApplicationConfigParserTest { JsonObject jsonRootObject = getJsonRootObject(); when(applicationConfigMock.getConfigurationFileSchemaPath()) - .thenReturn("application_configuration_schema.json"); + .thenReturn("/application_configuration_schema.json"); ApplicationConfigParser.ConfigParserResult result = parserUnderTest.parse(jsonRootObject); diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java index d2805556..b4ff6962 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java @@ -61,7 +61,7 @@ import reactor.test.StepVerifier; "server.ssl.key-store=./config/keystore.jks", // "app.webclient.trust-store=./config/truststore.jks", // "app.vardata-directory=./target", // - "app.config-file-schema-path=application_configuration_schema.json" // + "app.config-file-schema-path=/application_configuration_schema.json" // }) class ConfigurationControllerTest { @Autowired -- cgit 1.2.3-korg