summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authormark.j.leonard <mark.j.leonard@gmail.com>2019-01-15 10:34:53 +0000
committermark.j.leonard <mark.j.leonard@gmail.com>2019-01-16 13:38:29 +0000
commit715e009fa1b0b148fc64f8cf1bc2f536e4e2cb23 (patch)
treed0e126ba6052557a49f7e9a11f820b7946a5266a /src/test
parentc7e9ff11f28009c4fbc13f7ed1a3ffbb765d358b (diff)
Update to aai-schema-ingest version 1.4.1
Using SNAPSHOT version (as 1.4.1 is not released) Change-Id: I3b5959cb2d43840556a628db8fe17701d36aa6f9 Issue-ID: AAI-2077 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java41
-rw-r--r--src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java45
-rw-r--r--src/test/java/org/onap/aai/validation/reader/TestEventReader.java25
-rw-r--r--src/test/java/org/onap/aai/validation/reader/TestJsonReader.java25
-rw-r--r--src/test/java/org/onap/aai/validation/reader/TestOxmConfigTranslator.java111
-rw-r--r--src/test/java/org/onap/aai/validation/reader/TestOxmReader.java5
-rw-r--r--src/test/java/org/onap/aai/validation/result/TestValidationResult.java6
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java3
-rw-r--r--src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java8
-rw-r--r--src/test/java/org/onap/aai/validation/services/TestInfoService.java33
-rw-r--r--src/test/resources/model-validation/instance-validator/schemaIngest.properties36
-rw-r--r--src/test/resources/oxm-reader/multiple/test_business_v10.xml47
-rw-r--r--src/test/resources/oxm-reader/multiple/test_business_v13.xml42
-rw-r--r--src/test/resources/oxm-reader/multiple/test_network_v10.xml48
-rw-r--r--src/test/resources/oxm-reader/multiple/test_network_v13.xml73
-rw-r--r--src/test/resources/oxm-reader/oxm-reader-beans.xml35
-rw-r--r--src/test/resources/oxm-reader/schemaIngest.properties50
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_v0.xml23
-rw-r--r--src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml23
-rw-r--r--src/test/resources/oxm-reader/single/dbedgerules/v10/DbEdgeRules_test_v10_edges.json (renamed from src/test/resources/oxm-reader/single/test_v10_edges.json)0
-rw-r--r--src/test/resources/oxm-reader/single/oxm/v10/aai_oxm_v10.xml (renamed from src/test/resources/oxm-reader/single/aai_oxm_v10.xml)0
-rw-r--r--src/test/resources/oxm-reader/single/oxm/v8/aai_oxm_v8.xml (renamed from src/test/resources/oxm-reader/single/aai_oxm_v8.xml)0
-rw-r--r--src/test/resources/oxm-reader/single/oxm/v9/aai_oxm_v9.xml (renamed from src/test/resources/oxm-reader/single/aai_oxm_v9.xml)0
23 files changed, 171 insertions, 508 deletions
diff --git a/src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java
index 60588bb..38c790b 100644
--- a/src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java
+++ b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +35,6 @@ import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.onap.aai.validation.exception.ValidationServiceException;
import org.onap.aai.validation.modeldriven.configuration.mapping.ModelInstanceMapper;
-import org.onap.aai.validation.modeldriven.validator.InstanceReader;
import org.onap.aai.validation.test.util.TestUtil;
import org.onap.aai.validation.util.JsonUtil;
import org.springframework.test.context.ContextConfiguration;
@@ -43,7 +42,7 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = { "classpath:oxm-reader/schemaIngest.properties" })
@ContextConfiguration(locations = {"classpath:model-validation/instance-reader/test-validation-service-beans.xml"})
public class TestInstanceReader {
@@ -84,22 +83,26 @@ public class TestInstanceReader {
enum TestData {
// @formatter:off
- MAPPING ("model-validation/instance-reader/model-instance-mapping.json_conf"),
- MAPPING_ROOT_UNKNOWN ("model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf"),
- MAPPING_ROOT_MISSING ("model-validation/instance-reader/model-instance-mapping-root-missing.json_conf"),
- CONNECTOR ("model-validation/instance-reader/connector.json"),
- CONNECTOR_MODEL_NAME ("model-validation/instance-reader/connector-model-name.json"),
- CONNECTOR_SIBLING ("model-validation/instance-reader/connector-sibling-inventory-items.json"),
- EXPECTED_VDC ("model-validation/instance-reader/expected-virtual-data-center.json"),
- EXPECTED_VDC_MODEL_NAME ("model-validation/instance-reader/expected-virtual-data-center-model-name.json"),
- EXPECTED_LOGICAL_LINK ("model-validation/instance-reader/expected-logical-link.json"),
- EXPECTED_GENERIC_VNF ("model-validation/instance-reader/expected-generic-vnf.json"),
- EXPECTED_PSERVER ("model-validation/instance-reader/expected-pserver.json");
+ MAPPING ("model-validation/instance-reader/model-instance-mapping.json_conf"),
+ MAPPING_ROOT_UNKNOWN ("model-validation/instance-reader/model-instance-mapping-root-unknown.json_conf"),
+ MAPPING_ROOT_MISSING ("model-validation/instance-reader/model-instance-mapping-root-missing.json_conf"),
+ CONNECTOR ("model-validation/instance-reader/connector.json"),
+ CONNECTOR_MODEL_NAME ("model-validation/instance-reader/connector-model-name.json"),
+ CONNECTOR_SIBLING ("model-validation/instance-reader/connector-sibling-inventory-items.json"),
+ EXPECTED_VDC ("model-validation/instance-reader/expected-virtual-data-center.json"),
+ EXPECTED_VDC_MODEL_NAME ("model-validation/instance-reader/expected-virtual-data-center-model-name.json"),
+ EXPECTED_LOGICAL_LINK ("model-validation/instance-reader/expected-logical-link.json"),
+ EXPECTED_GENERIC_VNF ("model-validation/instance-reader/expected-generic-vnf.json"),
+ EXPECTED_PSERVER ("model-validation/instance-reader/expected-pserver.json");
+ // @formatter:on
private String filename;
- TestData(String filename) {this.filename = filename;}
- public String getFilename() {return this.filename;}
- // @formatter:on
+ TestData(String filename) {
+ this.filename = filename;
+ }
+ public String getFilename() {
+ return this.filename;
+ }
}
@Rule
@@ -161,8 +164,6 @@ public class TestInstanceReader {
JsonElement genericVnfJsonElement = jsonParser.parse(expectedGenericVnf);
String expectedGenericVnf = genericVnfJsonElement.toString();
- JsonElement pserverJsonElement = jsonParser.parse(expectedPserver);
- String expectedPserver = pserverJsonElement.toString();
// Method under test
Multimap<String, String> values = instanceReader.getValues(connectorSibling, mapping);
@@ -178,7 +179,7 @@ public class TestInstanceReader {
values = instanceReader.getValues(logicalLinkInstance, mapping);
assertThat(values.get("generic-vnf").iterator().next(), is(equalTo(expectedGenericVnf)));
- assertThat(values.get("pserver").iterator().next(), is(equalTo(expectedPserver)));
+ assertThat(values.get("pserver").iterator().next(), is(equalTo(jsonParser.parse(expectedPserver).toString())));
}
@Test
diff --git a/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java
index cb9de43..de06357 100644
--- a/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java
+++ b/src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java
@@ -1,12 +1,12 @@
-/*
+/**
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -43,7 +43,6 @@ import org.onap.aai.validation.controller.ValidationController;
import org.onap.aai.validation.modeldriven.ModelCacheManager;
import org.onap.aai.validation.modeldriven.ModelId;
import org.onap.aai.validation.modeldriven.parser.XMLModelParser;
-import org.onap.aai.validation.modeldriven.validator.ModelDrivenValidator;
import org.onap.aai.validation.result.ValidationResult;
import org.onap.aai.validation.result.Violation;
import org.onap.aai.validation.test.util.TestUtil;
@@ -52,7 +51,7 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
@ContextConfiguration(locations = {"classpath:model-validation/instance-validator/test-validation-service-beans.xml"})
public class TestModelDrivenValidator {
@@ -74,21 +73,21 @@ public class TestModelDrivenValidator {
private String objectInstance;
private String connectorModel;
- enum INSTANCE_VALIDATION_FILE {
+ static enum InstanceValidationFile {
// @formatter:off
- CONNECTOR_MODEL ("model-validation/instance-validator/connector-widget-id.xml"),
- NO_MODEL_ID ("model-validation/instance-validator/connector-instance-no-model-id.json"),
- UNKNOWN_MODEL_ID ("model-validation/instance-validator/connector-instance-unknown-model-id.json"),
- ERRORS ("model-validation/instance-validator/connector-instance-errors.json"),
- MULTIPLE_MISSING_ATTRS ("model-validation/instance-validator/connector-instance-multiple-missing-attrs.json"),
- MULTIPLE_UNEXPECTED_ATTRS ("model-validation/instance-validator/connector-instance-multiple-unexpected-attrs.json"),
- SUCCESS ("model-validation/instance-validator/connector-instance-success.json");
- // @formatter:on
+ CONNECTOR_MODEL ("connector-widget-id.xml"),
+ NO_MODEL_ID ("connector-instance-no-model-id.json"),
+ UNKNOWN_MODEL_ID ("connector-instance-unknown-model-id.json"),
+ ERRORS ("connector-instance-errors.json"),
+ MULTIPLE_MISSING_ATTRS ("connector-instance-multiple-missing-attrs.json"),
+ MULTIPLE_UNEXPECTED_ATTRS ("connector-instance-multiple-unexpected-attrs.json"),
+ SUCCESS ("connector-instance-success.json");
+ // @formatter:on
private String filename;
- INSTANCE_VALIDATION_FILE(String filename) {
- this.filename = filename;
+ InstanceValidationFile(String filename) {
+ this.filename = "model-validation/instance-validator/" + filename;
}
public String getFilename() {
@@ -103,12 +102,12 @@ public class TestModelDrivenValidator {
@Before
public void setUp() throws Exception {
- connectorModel = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.CONNECTOR_MODEL.getFilename());
+ connectorModel = TestUtil.getFileAsString(InstanceValidationFile.CONNECTOR_MODEL.getFilename());
}
@Test
public void testValidateInstanceWithoutModelId() throws Exception {
- objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.NO_MODEL_ID.getFilename());
+ objectInstance = TestUtil.getFileAsString(InstanceValidationFile.NO_MODEL_ID.getFilename());
ValidationResult validationResult = modelDrivenValidator.validate(objectInstance).get(0);
assertThatValidationResultIsValid(validationResult, "c7611ebe-c324-48f1-8085-94aef0c12fd", "connector",
@@ -123,7 +122,7 @@ public class TestModelDrivenValidator {
@Test
public void testValidateInstanceWithUnknownModelId() throws Exception {
- objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.UNKNOWN_MODEL_ID.getFilename());
+ objectInstance = TestUtil.getFileAsString(InstanceValidationFile.UNKNOWN_MODEL_ID.getFilename());
Mockito.when(mockModelCacheManager.get(new ModelId(MODEL_ID_ATTRIBUTE_MID, "UNKNOWN-MODEL"))).thenReturn(null);
@@ -140,7 +139,7 @@ public class TestModelDrivenValidator {
@Test
public void testValidate() throws Exception {
- objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.ERRORS.getFilename());
+ objectInstance = TestUtil.getFileAsString(InstanceValidationFile.ERRORS.getFilename());
Element modelElement = XMLModelParser.parse(connectorModel, true);
@@ -186,7 +185,7 @@ public class TestModelDrivenValidator {
@Test
public void testValidateMultipleMissingAttrs() throws Exception {
- objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.MULTIPLE_MISSING_ATTRS.getFilename());
+ objectInstance = TestUtil.getFileAsString(InstanceValidationFile.MULTIPLE_MISSING_ATTRS.getFilename());
Element modelElement = XMLModelParser.parse(connectorModel, true);
@@ -209,7 +208,7 @@ public class TestModelDrivenValidator {
@Test
public void testValidateMultipleUnexpectedAttrs() throws Exception {
- objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.MULTIPLE_UNEXPECTED_ATTRS.getFilename());
+ objectInstance = TestUtil.getFileAsString(InstanceValidationFile.MULTIPLE_UNEXPECTED_ATTRS.getFilename());
Element modelElement = XMLModelParser.parse(connectorModel, true);
@@ -232,7 +231,7 @@ public class TestModelDrivenValidator {
@Test
public void testValidateSuccess() throws Exception {
- objectInstance = TestUtil.getFileAsString(INSTANCE_VALIDATION_FILE.SUCCESS.getFilename());
+ objectInstance = TestUtil.getFileAsString(InstanceValidationFile.SUCCESS.getFilename());
Element modelElement = XMLModelParser.parse(connectorModel, true);
diff --git a/src/test/java/org/onap/aai/validation/reader/TestEventReader.java b/src/test/java/org/onap/aai/validation/reader/TestEventReader.java
index a41eb76..b7aba5e 100644
--- a/src/test/java/org/onap/aai/validation/reader/TestEventReader.java
+++ b/src/test/java/org/onap/aai/validation/reader/TestEventReader.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,6 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.aai.validation.exception.ValidationServiceException;
-import org.onap.aai.validation.reader.EventReader;
import org.onap.aai.validation.reader.data.Entity;
import org.onap.aai.validation.reader.data.EntityId;
import org.onap.aai.validation.test.util.TestUtil;
@@ -43,7 +42,7 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = { "classpath:oxm-reader/schemaIngest.properties" })
@ContextConfiguration(locations = {"classpath:event-reader/test-validation-service-beans.xml"})
public class TestEventReader {
@@ -77,16 +76,20 @@ public class TestEventReader {
// @formatter:off
VSERVER ("event-reader/vserver-create-event.json"),
GENERIC_VNF ("event-reader/generic-vnf-create-event.json"),
- INVALID_1 ("event-reader/invalid-event-1.json"),
- INVALID_2 ("event-reader/invalid-event-2.json"),
- INVALID_3 ("event-reader/invalid-event-3.json"),
- INVALID_4 ("event-reader/invalid-event-4.json"),
- INVALID_5 ("event-reader/invalid-event-5.json");
+ INVALID_1 ("event-reader/invalid-event-1.json"),
+ INVALID_2 ("event-reader/invalid-event-2.json"),
+ INVALID_3 ("event-reader/invalid-event-3.json"),
+ INVALID_4 ("event-reader/invalid-event-4.json"),
+ INVALID_5 ("event-reader/invalid-event-5.json");
+ // @formatter:on
private String filename;
- TestData(String filename) {this.filename = filename;}
- public String getFilename() {return this.filename;}
- // @formatter:on
+ TestData(String filename) {
+ this.filename = filename;
+ }
+ public String getFilename() {
+ return this.filename;
+ }
}
@Test
diff --git a/src/test/java/org/onap/aai/validation/reader/TestJsonReader.java b/src/test/java/org/onap/aai/validation/reader/TestJsonReader.java
index e7a906a..116534b 100644
--- a/src/test/java/org/onap/aai/validation/reader/TestJsonReader.java
+++ b/src/test/java/org/onap/aai/validation/reader/TestJsonReader.java
@@ -1,12 +1,12 @@
-/*
+/**
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertThat;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
-import org.onap.aai.validation.reader.JsonReader;
import org.onap.aai.validation.test.util.TestUtil;
public class TestJsonReader {
@@ -34,13 +33,19 @@ public class TestJsonReader {
}
enum TestData {
- // @formatter:off
- SAMPLE_JSON ("json-reader/sample.json");
+ SAMPLE_JSON(
+ "json-reader/sample.json"
+ );
- private String filename;
- TestData(String filename) {this.filename = filename;}
- public String getFilename() {return this.filename;}
- // @formatter:on
+ private String filename;
+
+ TestData(String filename) {
+ this.filename = filename;
+ }
+
+ public String getFilename() {
+ return this.filename;
+ }
}
@Test
diff --git a/src/test/java/org/onap/aai/validation/reader/TestOxmConfigTranslator.java b/src/test/java/org/onap/aai/validation/reader/TestOxmConfigTranslator.java
deleted file mode 100644
index 73e76db..0000000
--- a/src/test/java/org/onap/aai/validation/reader/TestOxmConfigTranslator.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=====================================================
- */
-package org.onap.aai.validation.reader;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.isEmptyString;
-import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertThat;
-
-import java.nio.file.InvalidPathException;
-import java.util.List;
-import java.util.Map;
-import java.util.ServiceConfigurationError;
-import org.junit.Test;
-import org.onap.aai.setup.SchemaLocationsBean;
-import org.onap.aai.setup.Version;
-import org.onap.aai.validation.reader.OxmConfigTranslator;
-import org.springframework.test.util.ReflectionTestUtils;
-
-public class TestOxmConfigTranslator {
-
- static {
- System.setProperty("APP_HOME", ".");
- }
-
- @Test
- public void testOxmFiles() {
- OxmConfigTranslator translator = buildConfigTranslator("src/test/resources/oxm-reader/single/");
- Map<Version, List<String>> latestVersion = translator.getNodeFiles();
- assertThat(latestVersion.size(), is(3));
- assertThat(latestVersion.values().iterator().next().size(), is(1));
- assertThat(latestVersion.values().iterator().next().get(0), not(isEmptyString()));
- Map<Version, List<String>> latestVersion1 = translator.getEdgeFiles();
- assertThat(latestVersion1.size(), is(1));
- assertThat(latestVersion1.values().iterator().next().size(), is(1));
- assertThat(latestVersion1.values().iterator().next().get(0), not(isEmptyString()));
- }
-
- @Test
- public void testMultipleOxmFilesPerVersion() {
- OxmConfigTranslator translator = buildConfigTranslator("src/test/resources/oxm-reader/multiple");
- Map<Version, List<String>> latestVersion = translator.getNodeFiles();
- assertThat(latestVersion.size(), is(2));
- assertThat(latestVersion.values().iterator().next().size(), is(2));
- assertThat(latestVersion.values().iterator().next().get(0), not(isEmptyString()));
- Map<Version, List<String>> latestVersion1 = translator.getEdgeFiles();
- assertThat(latestVersion1.size(), is(0));
- }
-
- @Test
- public void testZeroMatchingFiles() {
- OxmConfigTranslator translator = buildConfigTranslator("src/test/resources/oxm-reader/");
- Map<Version, List<String>> versionsMap = translator.getNodeFiles();
- assertThat(versionsMap.size(), is(0));
- }
-
- @Test(expected = ServiceConfigurationError.class)
- public void testNullNodesPath() {
- buildConfigTranslator(null).getNodeFiles();
- }
-
- @Test(expected = ServiceConfigurationError.class)
- public void testNullEdgesPath() {
- buildConfigTranslator(null).getEdgeFiles();
- }
-
- @Test(expected = ServiceConfigurationError.class)
- public void testNonExistentNodesPath() {
- buildConfigTranslator("no-such-folder-exists/").getNodeFiles();
- }
-
- @Test(expected = ServiceConfigurationError.class)
- public void testNonExistentEdgesPath() {
- SchemaLocationsBean bean = new SchemaLocationsBean();
- ReflectionTestUtils.setField(bean, "nodeDirectory", "src/test/resources/oxm-reader/");
- ReflectionTestUtils.setField(bean, "edgeDirectory", "no-such-folder-exists/");
- new OxmConfigTranslator(bean).getEdgeFiles();
- }
-
- @Test(expected = InvalidPathException.class)
- public void testInvalidPath() {
- buildConfigTranslator("\0").getEdgeFiles();
- }
-
- private OxmConfigTranslator buildConfigTranslator(String path) {
- return new OxmConfigTranslator(createSchemaLocationsBean(path));
- }
-
- private SchemaLocationsBean createSchemaLocationsBean(String path) {
- SchemaLocationsBean bean = new SchemaLocationsBean();
- ReflectionTestUtils.setField(bean, "nodeDirectory", path);
- ReflectionTestUtils.setField(bean, "edgeDirectory", path);
- return bean;
- }
-
-}
diff --git a/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java b/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java
index f7f2643..bbceae5 100644
--- a/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java
+++ b/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,13 +26,12 @@ import java.util.List;
import javax.inject.Inject;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.aai.validation.reader.OxmReader;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
@ContextConfiguration(locations = {"classpath:oxm-reader/oxm-reader-beans.xml"})
public class TestOxmReader {
diff --git a/src/test/java/org/onap/aai/validation/result/TestValidationResult.java b/src/test/java/org/onap/aai/validation/result/TestValidationResult.java
index 5d02101..32f85fe 100644
--- a/src/test/java/org/onap/aai/validation/result/TestValidationResult.java
+++ b/src/test/java/org/onap/aai/validation/result/TestValidationResult.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,8 +42,6 @@ import org.junit.runner.RunWith;
import org.onap.aai.validation.exception.ValidationServiceException;
import org.onap.aai.validation.reader.EventReader;
import org.onap.aai.validation.reader.data.Entity;
-import org.onap.aai.validation.result.ValidationResult;
-import org.onap.aai.validation.result.Violation;
import org.onap.aai.validation.result.Violation.Builder;
import org.onap.aai.validation.result.Violation.ViolationType;
import org.onap.aai.validation.test.util.TestUtil;
@@ -53,7 +51,7 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = { "classpath:oxm-reader/schemaIngest.properties" })
@ContextConfiguration(locations = {"classpath:validation-result/test-validation-service-beans.xml"})
public class TestValidationResult {
diff --git a/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java b/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java
index 8593f93..6545120 100644
--- a/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java
+++ b/src/test/java/org/onap/aai/validation/ruledriven/rule/RuleTester.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
package org.onap.aai.validation.ruledriven.rule;
import org.onap.aai.validation.reader.data.AttributeValues;
-import org.onap.aai.validation.ruledriven.rule.Rule;
/**
* Helper class for testing rules
diff --git a/src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java b/src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java
index cf1e874..643e2e3 100644
--- a/src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java
+++ b/src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java
@@ -1,6 +1,6 @@
/*
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,9 +45,9 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"})
-@ContextConfiguration(
- locations = {"classpath:" + TestRuleDrivenValidator.UNIT_TEST_FOLDER + "/test-rule-driven-validator-beans.xml"})
+@TestPropertySource(locations = { "classpath:oxm-reader/schemaIngest.properties" })
+@ContextConfiguration(locations = {
+ "classpath:" + TestRuleDrivenValidator.UNIT_TEST_FOLDER + "/test-rule-driven-validator-beans.xml" })
public class TestRuleDrivenValidator {
static {
diff --git a/src/test/java/org/onap/aai/validation/services/TestInfoService.java b/src/test/java/org/onap/aai/validation/services/TestInfoService.java
index 0bfa8ba..ac9591a 100644
--- a/src/test/java/org/onap/aai/validation/services/TestInfoService.java
+++ b/src/test/java/org/onap/aai/validation/services/TestInfoService.java
@@ -1,12 +1,12 @@
-/*
+/**
* ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
+ * Copyright (c) 2018-2019 Amdocs
* ============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,7 +35,6 @@ import org.junit.runner.RunWith;
import org.onap.aai.validation.controller.ValidationController;
import org.onap.aai.validation.exception.ValidationServiceException;
import org.onap.aai.validation.publisher.MockEventPublisher;
-import org.onap.aai.validation.services.InfoService;
import org.onap.aai.validation.test.util.TestEntity;
import org.onap.aai.validation.test.util.TestUtil;
import org.springframework.test.context.ContextConfiguration;
@@ -43,7 +42,7 @@ import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(properties = {"schemaIngestPropLoc = src/test/resources/oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties", "classpath:application.properties"})
@ContextConfiguration(locations = {"classpath:/info-service/test-validation-service-beans.xml"})
public class TestInfoService {
@@ -53,12 +52,18 @@ public class TestInfoService {
enum TestData {
// @formatter:off
- VSERVER ("rule-driven-validator/test_events/vserver-create-event.json");
+ VSERVER("rule-driven-validator/test_events/vserver-create-event.json");
+ // @formatter:on
private String filename;
- TestData(String filename) {this.filename = filename;}
- public String getFilename() {return this.filename;}
- // @formatter:on
+
+ TestData(String filename) {
+ this.filename = filename;
+ }
+
+ public String getFilename() {
+ return this.filename;
+ }
}
private InfoService infoService;
@@ -107,13 +112,9 @@ public class TestInfoService {
assertThat(info, containsString("errored=1"));
}
- /**
- * @throws ValidationServiceException
- * @throws IOException
- * @throws URISyntaxException
- */
+
@Test
- public void testVserverEventRecorded() throws ValidationServiceException, URISyntaxException, IOException {
+ public void testVserverEventRecorded() throws URISyntaxException, IOException {
Path vserverTestFile = Paths.get(ClassLoader.getSystemResource(TestData.VSERVER.getFilename()).toURI());
Path root = vserverTestFile.getParent();
assertThat(root, is(not(nullValue())));
@@ -128,7 +129,7 @@ public class TestInfoService {
/**
* Assert that the info service status string contains the expected standard results and formatting.
- *
+ *
* @param info
*/
private void assertResultsStringFormatted(String info) {
diff --git a/src/test/resources/model-validation/instance-validator/schemaIngest.properties b/src/test/resources/model-validation/instance-validator/schemaIngest.properties
index 3e295d0..8df810a 100644
--- a/src/test/resources/model-validation/instance-validator/schemaIngest.properties
+++ b/src/test/resources/model-validation/instance-validator/schemaIngest.properties
@@ -14,7 +14,35 @@
# limitations under the License.
# ============LICENSE_END=====================================================
-# Test properties for the org.onap.aai.setup.SchemaLocationsBean
-schemaConfig=NA
-nodeDir=src/test/resources/oxm-reader/single/
-edgeDir=src/test/resources/oxm-reader/single/ \ No newline at end of file
+# Properties for the org.onap.aai.setup.SchemaLocationsBean
+# Schema related attributes for the oxm and edges
+# Any additional schema related attributes should start with prefix schema
+schema.configuration.location=N/A
+schema.nodes.location=src/test/resources/oxm-reader/single/oxm
+schema.edges.location=src/test/resources/oxm-reader/single/dbedgerules
+
+# Schema Version Related Attributes
+
+# Lists all of the versions in the schema
+schema.version.list=v8,v9,v10
+# Specifies from which version should the depth parameter to default to zero
+schema.version.depth.start=v9
+# Specifies from which version should the related link be displayed in response payload
+schema.version.related.link.start=v10
+# Specifies from which version should the client see only the uri excluding host info
+# Before this version server base will also be included
+schema.version.app.root.start=v10
+# Specifies from which version should the namespace be changed
+schema.version.namespace.change.start=v10
+# Specifies from which version should the client start seeing the edge label in payload
+schema.version.edge.label.start=v10
+# Specifies the version that the application should default to
+schema.version.api.default=v9
+
+schema.service.base.url=https://localhost:8452/aai/schema-service/v1/
+schema.service.nodes.endpoint=nodes?version=
+schema.service.edges.endpoint=edgerules?version=
+schema.service.versions.endpoint=versions
+
+schema.service.ssl.key-store=src/integration-test/resources/authentication/aai-client-cert.p12
+schema.service.ssl.trust-store=src/integration-test/resources/authentication/tomcat_keystore
diff --git a/src/test/resources/oxm-reader/multiple/test_business_v10.xml b/src/test/resources/oxm-reader/multiple/test_business_v10.xml
deleted file mode 100644
index f0dc93f..0000000
--- a/src/test/resources/oxm-reader/multiple/test_business_v10.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.business.v12" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.onap.aai.inventory/v12" />
- </xml-schema>
- <java-types>
-
- <java-type name="Bar">
- <xml-root-element name="bar" />
- <java-attributes>
- <xml-element java-attribute="barId" name="bar-id" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Bar This is unique across the graph." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="quantity" name="quantity" required="false" type="java.lang.Integer">
- <xml-properties>
- <xml-property name="description" value="How many." />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- <xml-property name="uniqueProps" value="bar-id" />
- </xml-properties>
- </java-type>
-
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/multiple/test_business_v13.xml b/src/test/resources/oxm-reader/multiple/test_business_v13.xml
deleted file mode 100644
index 2529c6d..0000000
--- a/src/test/resources/oxm-reader/multiple/test_business_v13.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.business.v13" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.onap.aai.inventory/v13" />
- </xml-schema>
- <java-types>
-
- <java-type name="Bar">
- <xml-root-element name="bar" />
- <java-attributes>
- <xml-element java-attribute="barId" name="bar-id" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Bar This is unique across the graph." />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- <xml-property name="uniqueProps" value="bar-id" />
- </xml-properties>
- </java-type>
-
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/multiple/test_network_v10.xml b/src/test/resources/oxm-reader/multiple/test_network_v10.xml
deleted file mode 100644
index 9767de6..0000000
--- a/src/test/resources/oxm-reader/multiple/test_network_v10.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.network.v10" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.onap.aai.inventory/v12" />
- </xml-schema>
- <java-types>
-
- <java-type name="Foo">
- <xml-root-element name="foo" />
- <java-attributes>
- <xml-element java-attribute="fooId" name="foo-id" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Foo. This is unique across the graph." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="fooName" name="foo-name" required="true" type="java.lang.String">
- <xml-properties>
- <xml-property name="description" value="Name of Foo." />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- <xml-property name="nameProps" value="foo-name" />
- <xml-property name="uniqueProps" value="foo-id" />
- </xml-properties>
- </java-type>
-
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/multiple/test_network_v13.xml b/src/test/resources/oxm-reader/multiple/test_network_v13.xml
deleted file mode 100644
index 892f626..0000000
--- a/src/test/resources/oxm-reader/multiple/test_network_v13.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.network.v13" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.onap.aai.inventory/v13" />
- </xml-schema>
- <java-types>
-
- <java-type name="Foo">
- <xml-root-element name="foo" />
- <java-attributes>
- <xml-element java-attribute="fooId" name="foo-id" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Foo. This is unique across the graph." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="fooName" name="foo-name" required="true" type="java.lang.String">
- <xml-properties>
- <xml-property name="description" value="Name of Foo." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="quantity" name="quantity" required="false" type="java.lang.String">
- <xml-properties>
- <xml-property name="description" value="How many." />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- <xml-property name="nameProps" value="foo-name" />
- <xml-property name="uniqueProps" value="foo-id" />
- </xml-properties>
- </java-type>
-
- <java-type name="Quux">
- <xml-root-element name="quux" />
- <java-attributes>
- <xml-element java-attribute="qManagerName" name="q-manager-name" required="true" type="java.lang.String" xml-key="true">
- <xml-properties>
- <xml-property name="description" value="Unique id of Quux owner. This is unique across the graph." />
- </xml-properties>
- </xml-element>
- <xml-element java-attribute="color" name="color" required="false" type="java.lang.String">
- <xml-properties>
- <xml-property name="description" value="color" />
- </xml-properties>
- </xml-element>
-
- </java-attributes>
- <xml-properties>
- <xml-property name="description" value="General purpose metasyntactic variable" />
- </xml-properties>
- </java-type>
-
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/oxm-reader-beans.xml b/src/test/resources/oxm-reader/oxm-reader-beans.xml
index c9f064a..93a2ff7 100644
--- a/src/test/resources/oxm-reader/oxm-reader-beans.xml
+++ b/src/test/resources/oxm-reader/oxm-reader-beans.xml
@@ -1,40 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END=====================================================
--->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <bean id="schemaLocationsBean" class="org.onap.aai.setup.SchemaLocationsBean" />
+ <bean id="schemaLocationsBean" class="org.onap.aai.setup.SchemaLocationsBean" />
- <bean id="configTranslator" class="org.onap.aai.validation.reader.OxmConfigTranslator">
- <constructor-arg ref="schemaLocationsBean" />
- </bean>
+ <bean id="schemaVersionsBean" class="org.onap.aai.setup.SchemaVersions" />
- <bean id="nodeIngestor" class="org.onap.aai.nodes.NodeIngestor">
- <constructor-arg ref="configTranslator" />
- </bean>
+ <bean id="configTranslator" class="org.onap.aai.setup.AAIConfigTranslator" />
+
+ <bean id="nodeIngestor" class="org.onap.aai.nodes.NodeIngestor" />
+ <bean id="schemaVersionBean" class="org.onap.aai.setup.SchemaVersion">
+ <constructor-arg value="${schema.version.api.default}" />
+ </bean>
+
<bean id="oxmReader" class="org.onap.aai.validation.reader.OxmReader" init-method="init">
<constructor-arg ref="nodeIngestor" />
- <constructor-arg value="V9" />
+ <constructor-arg ref="schemaVersionBean" />
</bean>
</beans>
diff --git a/src/test/resources/oxm-reader/schemaIngest.properties b/src/test/resources/oxm-reader/schemaIngest.properties
index bb1027e..43e755b 100644
--- a/src/test/resources/oxm-reader/schemaIngest.properties
+++ b/src/test/resources/oxm-reader/schemaIngest.properties
@@ -1,20 +1,32 @@
-# ============LICENSE_START===================================================
-# Copyright (c) 2018 Amdocs
-# ============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=====================================================
+# Properties for the org.onap.aai.setup.SchemaLocationsBean
+# Schema related attributes for the oxm and edges
+# Any additional schema related attributes should start with prefix schema
+schema.configuration.location=N/A
+schema.nodes.location=src/test/resources/oxm-reader/single/oxm
+schema.edges.location=src/test/resources/oxm-reader/single/dbedgerules
-# Test properties for the org.onap.aai.setup.SchemaLocationsBean
-schemaConfig=NA
-nodeDir=src/test/resources/oxm-reader/single/
-edgeDir=src/test/resources/oxm-reader/single/ \ No newline at end of file
+# Schema Version Related Attributes
+
+# Lists all of the versions in the schema
+schema.version.list=v8,v9,v10
+# Specifies from which version should the depth parameter to default to zero
+schema.version.depth.start=v9
+# Specifies from which version should the related link be displayed in response payload
+schema.version.related.link.start=v10
+# Specifies from which version should the client see only the uri excluding host info
+# Before this version server base will also be included
+schema.version.app.root.start=v10
+# Specifies from which version should the namespace be changed
+schema.version.namespace.change.start=v10
+# Specifies from which version should the client start seeing the edge label in payload
+schema.version.edge.label.start=v10
+# Specifies the version that the application should default to
+schema.version.api.default=v9
+
+schema.service.base.url=https://localhost:8452/aai/schema-service/v1/
+schema.service.nodes.endpoint=nodes?version=
+schema.service.edges.endpoint=edgerules?version=
+schema.service.versions.endpoint=versions
+
+schema.service.ssl.key-store=appconfig-local/auth/aai-client-cert.p12
+schema.service.ssl.trust-store=appconfig-local/auth/tomcat_keystore \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v0.xml b/src/test/resources/oxm-reader/single/aai_oxm_v0.xml
deleted file mode 100644
index ffab598..0000000
--- a/src/test/resources/oxm-reader/single/aai_oxm_v0.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v9" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v9" />
- </xml-schema>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml b/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml
deleted file mode 100644
index ffab598..0000000
--- a/src/test/resources/oxm-reader/single/aai_oxm_vnonDigit.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-============LICENSE_START===================================================
-Copyright (c) 2018 Amdocs
-============================================================================
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-============LICENSE_END=====================================================
--->
-<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="inventory.aai.onap.org.v9" xml-mapping-metadata-complete="true">
- <xml-schema element-form-default="QUALIFIED">
- <xml-ns namespace-uri="http://org.openecomp.aai.inventory/v9" />
- </xml-schema>
-</xml-bindings> \ No newline at end of file
diff --git a/src/test/resources/oxm-reader/single/test_v10_edges.json b/src/test/resources/oxm-reader/single/dbedgerules/v10/DbEdgeRules_test_v10_edges.json
index e69de29..e69de29 100644
--- a/src/test/resources/oxm-reader/single/test_v10_edges.json
+++ b/src/test/resources/oxm-reader/single/dbedgerules/v10/DbEdgeRules_test_v10_edges.json
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v10.xml b/src/test/resources/oxm-reader/single/oxm/v10/aai_oxm_v10.xml
index b4c880a..b4c880a 100644
--- a/src/test/resources/oxm-reader/single/aai_oxm_v10.xml
+++ b/src/test/resources/oxm-reader/single/oxm/v10/aai_oxm_v10.xml
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v8.xml b/src/test/resources/oxm-reader/single/oxm/v8/aai_oxm_v8.xml
index 40939a4..40939a4 100644
--- a/src/test/resources/oxm-reader/single/aai_oxm_v8.xml
+++ b/src/test/resources/oxm-reader/single/oxm/v8/aai_oxm_v8.xml
diff --git a/src/test/resources/oxm-reader/single/aai_oxm_v9.xml b/src/test/resources/oxm-reader/single/oxm/v9/aai_oxm_v9.xml
index 6fe7379..6fe7379 100644
--- a/src/test/resources/oxm-reader/single/aai_oxm_v9.xml
+++ b/src/test/resources/oxm-reader/single/oxm/v9/aai_oxm_v9.xml