Update to spring boot 2 04/111704/1 guilin
authorIgor Dysko <igor1.dysko@orange.com>
Tue, 25 Aug 2020 18:06:23 +0000 (20:06 +0200)
committerIgor Dysko <igor1.dysko@orange.com>
Tue, 25 Aug 2020 18:06:23 +0000 (20:06 +0200)
Update of dependencies and source code to spring boot 2

Issue-ID: AAI-3106
Signed-off-by: Igor Dysko <igor1.dysko@orange.com>
Change-Id: Ie12c330af37d3cc841913c22a3703bcc3ae8a5d5

19 files changed:
pom.xml
src/main/java/org/onap/aai/validation/ValidationCmd.java
src/main/java/org/onap/aai/validation/ValidationServiceApplication.java
src/main/resources/application.properties
src/test/java/org/onap/aai/validation/TestApplication.java
src/test/java/org/onap/aai/validation/controller/TestValidationController.java
src/test/java/org/onap/aai/validation/modeldriven/validator/TestInstanceReader.java
src/test/java/org/onap/aai/validation/modeldriven/validator/TestModelDrivenValidator.java
src/test/java/org/onap/aai/validation/reader/TestEventReader.java
src/test/java/org/onap/aai/validation/reader/TestOxmReader.java
src/test/java/org/onap/aai/validation/result/TestValidationResult.java
src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java
src/test/java/org/onap/aai/validation/ruledriven/validator/TestDataDictionary.java
src/test/java/org/onap/aai/validation/ruledriven/validator/TestRuleDrivenValidator.java
src/test/java/org/onap/aai/validation/services/TestInfoService.java
src/test/resources/data-dictionary/test-data-dictionary-beans.xml
src/test/resources/oxm-reader/oxm-reader-beans.xml
src/test/resources/oxm-reader/schemaIngest.properties [deleted file]
src/test/resources/schema-ingest.properties [moved from src/test/resources/data-dictionary/schemaIngest.properties with 88% similarity]

diff --git a/pom.xml b/pom.xml
index 3c5790e..0845361 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <name>aai-validation</name>
     <version>1.7.0-SNAPSHOT</version>
     <parent>
-        <groupId>org.onap.oparent</groupId>
-        <artifactId>oparent</artifactId>
-        <version>2.1.0</version>
-        <relativePath />
+        <groupId>org.onap.aai.aai-common</groupId>
+        <artifactId>aai-parent</artifactId>
+        <version>1.7.0-SNAPSHOT</version>
     </parent>
 
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-dependencies</artifactId>
-                <version>${spring-boot.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
     <properties>
-        <spring-boot.version>1.5.21.RELEASE</spring-boot.version>
         <start-class>org.onap.aai.validation.ValidationServiceApplication</start-class>
         <serverPort>9500</serverPort>
         <sslport>9501</sslport>
-        <version.org.onap.aai.logging-service>1.2.2</version.org.onap.aai.logging-service>
-        <version.aai.rest.client>1.4.0</version.aai.rest.client>
-        <version.org.onap.aai.event.client>1.4.0</version.org.onap.aai.event.client>
-        <version.com.ecomp.aai.gap.data.client>1.0</version.com.ecomp.aai.gap.data.client>
-        <version.com.google.code.gson>2.7</version.com.google.code.gson>
-        <version.com.jayway.jsonpath>2.2.0</version.com.jayway.jsonpath>
-        <version.commons-configuration>1.10</version.commons-configuration>
-        <version.jaxen.jaxen>1.1.6</version.jaxen.jaxen>
-        <version.org.apache.httpcomponents.httpclient>4.5.2</version.org.apache.httpcomponents.httpclient>
         <version.org.codehaus.groovy.groovy-eclipse-batch>2.4.3-01</version.org.codehaus.groovy.groovy-eclipse-batch>
         <version.org.codehaus.groovy.groovy-eclipse-compiler>2.9.2-01</version.org.codehaus.groovy.groovy-eclipse-compiler>
-        <version.org.eclipse.persistence.moxy>2.6.2</version.org.eclipse.persistence.moxy>
-        <version.org.hamcrest.hamcrest-library>1.3</version.org.hamcrest.hamcrest-library>
-        <version.org.json.json>20160212</version.org.json.json>
-        <version.aai.aai-schema>1.6.6</version.aai.aai-schema>
-        <version.aai.aai-schema-ingest>1.4.1</version.aai.aai-schema-ingest>
+
         <aai.oxm.target.folder>${project.build.directory}/bundleconfig/etc/oxm/</aai.oxm.target.folder>
-        <version.org.glassfish.jersey.core.jersey-client>2.23</version.org.glassfish.jersey.core.jersey-client>
         <docker.location>${basedir}/target</docker.location>
-       <!-- Code coverage enforcement -->
-       <sonar.jacoco.reportPath />
-       <sonar.jacoco.itReportPath />
-       <sonar.jacoco.reportMissing.force.zero />
-       
-       <jacoco.line.coverage.limit>0.90</jacoco.line.coverage.limit>
-       <jacoco.version>0.8.5</jacoco.version>
-       <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
-       <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
-       <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
-       <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
-       
-       <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
-       
-        <jacoco.line.coverage.limit>0.80</jacoco.line.coverage.limit>
+        <jacoco.line.coverage.limit>0.55</jacoco.line.coverage.limit>
     </properties>
 
     <dependencies>
+        <dependency>
+            <groupId>net.bytebuddy</groupId>
+            <artifactId>byte-buddy</artifactId>
+            <version>1.10.14</version>
+        </dependency>
+        <dependency>
+            <groupId>net.bytebuddy</groupId>
+            <artifactId>byte-buddy-agent</artifactId>
+            <version>1.10.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <version>2.23.4</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest</artifactId>
+            <version>2.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-api-mockito2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-core</artifactId>
+        </dependency>
+
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
         <dependency>
             <groupId>org.codehaus.groovy</groupId>
             <artifactId>groovy-all</artifactId>
+            <version>2.4.17</version>
         </dependency>
         <dependency>
             <groupId>javax.ws.rs</groupId>
             <artifactId>javax.ws.rs-api</artifactId>
-            <version>2.0.1</version>
         </dependency>
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
-            <version>2.4</version>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
-            <version>3.7</version>
         </dependency>
         <dependency>
             <groupId>commons-collections</groupId>
             <artifactId>commons-collections</artifactId>
+            <version>3.2.2</version>
         </dependency>
         <dependency>
             <groupId>org.dom4j</groupId>
         <dependency>
             <groupId>org.onap.aai.logging-service</groupId>
             <artifactId>logging-api</artifactId>
-            <version>${version.org.onap.aai.logging-service}</version>
         </dependency>
 
         <dependency>
             <groupId>org.onap.aai.logging-service</groupId>
             <artifactId>common-logging</artifactId>
-            <version>${version.org.onap.aai.logging-service}</version>
         </dependency>
 
         <dependency>
             <groupId>org.onap.aai.logging-service</groupId>
             <artifactId>eelf-logging</artifactId>
-            <version>${version.org.onap.aai.logging-service}</version>
+            <version>${aai.common.logging.version}</version>
         </dependency>
 
         <dependency>
             <groupId>com.att.eelf</groupId>
             <artifactId>eelf-core</artifactId>
-            <version>1.0.1-oss</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.powermock</groupId>
+                    <artifactId>powermock-module-junit4</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.powermock</groupId>
+                    <artifactId>powermock-api-mockito</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>
             <groupId>org.onap.aai</groupId>
             <artifactId>rest-client</artifactId>
-            <version>${version.aai.rest.client}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
+            <artifactId>dmaapClient</artifactId>
+            <version>1.1.5</version>
         </dependency>
 
         <dependency>
             <groupId>org.onap.aai.event-client</groupId>
             <artifactId>event-client-dmaap</artifactId>
-            <version>${version.org.onap.aai.event.client}</version>
+            <version>1.4.0</version>
         </dependency>
 
         <dependency>
         <dependency>
             <groupId>commons-configuration</groupId>
             <artifactId>commons-configuration</artifactId>
-            <version>${version.commons-configuration}</version>
         </dependency>
 
         <dependency>
         <dependency>
             <groupId>org.eclipse.persistence</groupId>
             <artifactId>org.eclipse.persistence.moxy</artifactId>
-            <version>${version.org.eclipse.persistence.moxy}</version>
         </dependency>
 
         <dependency>
             <groupId>org.json</groupId>
             <artifactId>json</artifactId>
-            <version>${version.org.json.json}</version><!--$NO-MVN-MAN-VER$ -->
         </dependency>
 
         <dependency>
         <dependency>
             <groupId>org.onap.aai.aai-common</groupId>
             <artifactId>aai-schema-ingest</artifactId>
-            <version>${version.aai.aai-schema-ingest}</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.springframework.boot</groupId>
                     <artifactId>spring-boot-starter-tomcat</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>org.powermock</groupId>
+                    <artifactId>powermock-module-junit4</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
+
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.hamcrest</groupId>
-            <artifactId>hamcrest-library</artifactId>
-            <scope>test</scope>
-        </dependency>
-
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>1.1.1</version>
+        </dependency>
     </dependencies>
 
     <build>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>${spring-boot.version}</version>
                 <configuration>
                     <mainClass>${start-class}</mainClass>
                     <executable>true</executable>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
+                <version>3.8.1</version>
                 <configuration>
                     <compilerId>groovy-eclipse-compiler</compilerId>
                     <verbose>true</verbose>
                                 <artifactItem>
                                     <groupId>org.onap.aai.schema-service</groupId>
                                     <artifactId>aai-schema</artifactId>
-                                    <version>${version.aai.aai-schema}</version>
+                                    <version>${aai.schema.service.version}</version>
                                     <type>jar</type>
                                     <includes>onap/oxm/**/</includes>
                                     <outputDirectory>${aai.oxm.target.folder}</outputDirectory>
            <plugin>
              <groupId>org.jacoco</groupId>
              <artifactId>jacoco-maven-plugin</artifactId>
-             <version>${jacoco.version}</version>
              <configuration>
                <!-- Note: This exclusion list should match <sonar.exclusions> property
                     above -->
index 92ed5ad..c8d33cc 100644 (file)
@@ -33,7 +33,7 @@ import org.onap.aai.validation.result.ValidationResult;
 import org.onap.aai.validation.result.Violation;
 import org.onap.aai.validation.ruledriven.RuleDrivenValidator;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.AnnotationConfigApplicationContext;
 import org.springframework.context.annotation.Configuration;
index 52cb339..45d93c4 100644 (file)
@@ -30,7 +30,7 @@ import org.onap.aai.validation.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.ImportResource;
index 2c93762..905d920 100644 (file)
@@ -45,4 +45,5 @@ publisher.topic.names=poa-audit-result
 topics.properties.location=${CONFIG_HOME}/topics/
 
 schema.translator.list=schema-service
-spring.application.name=aai-validation
\ No newline at end of file
+spring.application.name=aai-validation
+spring.main.allow-bean-definition-overriding=true
index 9f66df9..13dc999 100644 (file)
@@ -27,17 +27,20 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.TestPropertySource;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 /**
  * Invoke the Spring Boot Application (primarily for code coverage).
  *
  */
-@SpringBootTest(classes = ValidationServiceApplication.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties", "classpath:test-application.properties"})
-@ContextConfiguration(locations = {"classpath:validation-service-beans.xml"})
+@SpringBootTest
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = {"classpath:data-dictionary/test-data-dictionary-beans.xml"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties", "classpath:test-application.properties"})
 public class TestApplication {
 
     @Rule
index b35ed17..cab1cbb 100644 (file)
  */
 package org.onap.aai.validation.controller;
 
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.Mockito;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.stubbing.OngoingStubbing;
 import org.onap.aai.validation.Validator;
 import org.onap.aai.validation.config.ValidationControllerConfig;
 import org.onap.aai.validation.exception.ValidationServiceError;
@@ -49,7 +40,11 @@ import org.onap.aai.validation.result.ValidationResult;
 import org.onap.aai.validation.result.ValidationResultBuilder;
 import org.onap.aai.validation.result.Violation;
 
-@RunWith(MockitoJUnitRunner.class)
+import java.util.*;
+
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.Silent.class)
 public class TestValidationController {
 
     private static final String AAI_EVENT = "AAI-EVENT";
@@ -105,7 +100,6 @@ public class TestValidationController {
 
     @Before
     public void setupMocks() throws ValidationServiceException {
-
         Map<String, List<ValidationResult>> validationResultsMap = setupTestData();
 
         when(ruleDrivenValidator.validate(TESTDATA_EVENTTYPE_AAI))
@@ -263,16 +257,19 @@ public class TestValidationController {
 
     @Test
     public void testExecuteForNullDomain() throws Exception {
-        doVerifyMockInteractionsTest(TESTDATA_DOMAIN_NULL, TEST);
+        doVerifyMockInteractionsTest(TESTDATA_DOMAIN_NULL, TEST, 2);
     }
 
-    private void doVerifyMockInteractionsTest(String event, String eventSource) throws Exception {
+    private void doVerifyMockInteractionsTest(String event, String eventSource, int eventReaderCallsCount) throws Exception {
         validationController.execute(event, eventSource);
-        verify(eventReader, times(1)).getEventType(Mockito.anyString());
+        verify(eventReader, times(eventReaderCallsCount)).getEventType(Mockito.anyString());
         verify(ruleDrivenValidator, times(0)).validate(Mockito.anyString());
         verify(modelDrivenValidator, times(0)).validate(Mockito.anyString());
         verify(messagePublisher, times(0)).publishMessage(Mockito.anyString());
+    }
 
+    private void doVerifyMockInteractionsTest(String event, String eventSource) throws Exception {
+        doVerifyMockInteractionsTest(event, eventSource, 1);
     }
 
     @Test
@@ -318,7 +315,7 @@ public class TestValidationController {
 
     @Test
     public void testExecuteForEndEventType() throws Exception {
-        doVerifyMockInteractionsTest(TESTDATA_EVENTTYPE_END_EVENT, TEST);
+        doVerifyMockInteractionsTest(TESTDATA_EVENTTYPE_END_EVENT, TEST, 2);
     }
 
     @Test
@@ -391,4 +388,5 @@ public class TestValidationController {
         when(entity.getEntityLink()).thenReturn(ENTITY_LINK);
         when(entity.getResourceVersion()).thenReturn(Optional.of(resourceVersion));
     }
+
 }
index 4d076da..772ccd6 100644 (file)
@@ -45,7 +45,7 @@ import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties"})
 @ContextConfiguration(locations = {"classpath:model-validation/instance-reader/test-validation-service-beans.xml"})
 public class TestInstanceReader {
 
index 5a58f41..ea98a02 100644 (file)
@@ -55,7 +55,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @SpringBootTest
 @RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties"})
 @ContextConfiguration(locations = {"classpath:model-validation/instance-validator/test-validation-service-beans.xml"})
 public class TestModelDrivenValidator {
 
index 844c010..1625cd2 100644 (file)
@@ -45,7 +45,7 @@ import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties"})
 @ContextConfiguration(locations = {"classpath:event-reader/test-validation-service-beans.xml"})
 public class TestEventReader {
 
index bbceae5..4432dfa 100644 (file)
@@ -31,7 +31,7 @@ import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties"})
 @ContextConfiguration(locations = {"classpath:oxm-reader/oxm-reader-beans.xml"})
 public class TestOxmReader {
 
index 7ce0b34..d1833f0 100644 (file)
@@ -54,7 +54,7 @@ import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties"})
 @ContextConfiguration(locations = {"classpath:validation-result/test-validation-service-beans.xml"})
 public class TestValidationResult {
 
index b87e4af..3695fca 100644 (file)
@@ -24,8 +24,9 @@ package org.onap.aai.validation.ruledriven.mock;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
-import static org.mockito.Matchers.anyListOf;
-import static org.mockito.Matchers.anyString;
+import static org.mockito.ArgumentMatchers.anyListOf;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.when;
 
 import com.google.gson.JsonObject;
@@ -41,7 +42,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.invocation.InvocationOnMock;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.mockito.stubbing.Answer;
 import org.onap.aai.validation.Validator;
 import org.onap.aai.validation.exception.ValidationServiceException;
@@ -58,7 +59,7 @@ import org.onap.aai.validation.ruledriven.RuleDrivenValidator;
  * for both a supported and an unsupported entity type.
  *
  */
-@RunWith(MockitoJUnitRunner.class)
+@RunWith(MockitoJUnitRunner.Silent.class)
 public class TestDefaultRules {
 
     static {
index 7292dec..108ee30 100644 (file)
@@ -46,7 +46,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  * 
  */
 @RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties"})
 @ContextConfiguration(locations = {"classpath:data-dictionary/test-data-dictionary-beans.xml"})
 public class TestDataDictionary {
 
index 27039a0..f33e9e9 100644 (file)
@@ -53,7 +53,7 @@ import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties"})
 @ContextConfiguration(
         locations = {"classpath:" + TestRuleDrivenValidator.UNIT_TEST_FOLDER + "/test-rule-driven-validator-beans.xml"})
 public class TestRuleDrivenValidator {
index c975d16..6090576 100644 (file)
@@ -47,7 +47,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 @SpringBootTest
 @RunWith(SpringJUnit4ClassRunner.class)
-@TestPropertySource(locations = {"classpath:oxm-reader/schemaIngest.properties", "classpath:application.properties"})
+@TestPropertySource(locations = {"classpath:schema-ingest.properties", "classpath:application.properties"})
 @ContextConfiguration(locations = {"classpath:/info-service/test-validation-service-beans.xml"})
 public class TestInfoService {
 
index 78a92f1..4bbb1af 100644 (file)
@@ -18,7 +18,7 @@
         classpath:aai-environment.properties,
         classpath:data-dictionary/validation-service.properties,
         classpath:data-dictionary/validation-service-auth.properties,
-        classpath:data-dictionary/schemaIngest.properties,
+        classpath:schema-ingest.properties,
         classpath:data-dictionary/rule-indexing.properties"
                ignore-unresolvable="true" />
 
index 93a2ff7..a85c081 100644 (file)
@@ -7,7 +7,7 @@
 
     <bean id="schemaLocationsBean" class="org.onap.aai.setup.SchemaLocationsBean" />
 
-    <bean id="schemaVersionsBean" class="org.onap.aai.setup.SchemaVersions" />
+    <bean id="schemaConfigVersionsBean" class="org.onap.aai.setup.SchemaConfigVersions" />
 
     <bean id="configTranslator" class="org.onap.aai.setup.AAIConfigTranslator" />
 
diff --git a/src/test/resources/oxm-reader/schemaIngest.properties b/src/test/resources/oxm-reader/schemaIngest.properties
deleted file mode 100644 (file)
index 34c8796..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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=
-schema.service.ssl.trust-store=
\ No newline at end of file
@@ -39,4 +39,10 @@ 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=
+schema.service.ssl.trust-store=
\ No newline at end of file