aboutsummaryrefslogtreecommitdiffstats
path: root/a1-policy-management/src/test/java/org
diff options
context:
space:
mode:
authorPatrikBuhr <patrik.buhr@est.tech>2021-10-08 14:08:59 +0200
committerPatrikBuhr <patrik.buhr@est.tech>2021-10-11 15:58:16 +0200
commite81a9de40bc0acb4a15ecf9fd60500a6f71344e4 (patch)
treefe5cba1d66e1aeab40a0a433b5a17d5e8166b0e8 /a1-policy-management/src/test/java/org
parent8efef0513821e7a586de4831a982833050be03e8 (diff)
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 <patrik.buhr@est.tech> Change-Id: I49a41b9124b74d5019200cc9b6eb48c5d46b043d
Diffstat (limited to 'a1-policy-management/src/test/java/org')
-rw-r--r--a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/MockPolicyManagementService.java3
-rw-r--r--a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/configuration/ApplicationConfigParserTest.java2
-rw-r--r--a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ConfigurationControllerTest.java2
3 files changed, 4 insertions, 3 deletions
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