diff options
19 files changed, 126 insertions, 139 deletions
@@ -30,67 +30,56 @@ <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> <exclusions> @@ -115,25 +104,24 @@ <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> @@ -155,37 +143,49 @@ <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> @@ -201,7 +201,6 @@ <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> - <version>${version.commons-configuration}</version> </dependency> <dependency> @@ -217,13 +216,11 @@ <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> @@ -234,14 +231,18 @@ <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> @@ -249,17 +250,28 @@ </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> @@ -272,7 +284,6 @@ <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> @@ -288,7 +299,7 @@ <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> @@ -324,7 +335,7 @@ <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> @@ -435,7 +446,6 @@ <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 --> diff --git a/src/main/java/org/onap/aai/validation/ValidationCmd.java b/src/main/java/org/onap/aai/validation/ValidationCmd.java index 92ed5ad..c8d33cc 100644 --- a/src/main/java/org/onap/aai/validation/ValidationCmd.java +++ b/src/main/java/org/onap/aai/validation/ValidationCmd.java @@ -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; diff --git a/src/main/java/org/onap/aai/validation/ValidationServiceApplication.java b/src/main/java/org/onap/aai/validation/ValidationServiceApplication.java index 52cb339..45d93c4 100644 --- a/src/main/java/org/onap/aai/validation/ValidationServiceApplication.java +++ b/src/main/java/org/onap/aai/validation/ValidationServiceApplication.java @@ -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; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 2c93762..905d920 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -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 diff --git a/src/test/java/org/onap/aai/validation/TestApplication.java b/src/test/java/org/onap/aai/validation/TestApplication.java index 9f66df9..13dc999 100644 --- a/src/test/java/org/onap/aai/validation/TestApplication.java +++ b/src/test/java/org/onap/aai/validation/TestApplication.java @@ -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 diff --git a/src/test/java/org/onap/aai/validation/controller/TestValidationController.java b/src/test/java/org/onap/aai/validation/controller/TestValidationController.java index b35ed17..cab1cbb 100644 --- a/src/test/java/org/onap/aai/validation/controller/TestValidationController.java +++ b/src/test/java/org/onap/aai/validation/controller/TestValidationController.java @@ -17,26 +17,17 @@ */ 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)); } + } 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 4d076da..772ccd6 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 @@ -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 { 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 5a58f41..ea98a02 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 @@ -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 { 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 844c010..1625cd2 100644 --- a/src/test/java/org/onap/aai/validation/reader/TestEventReader.java +++ b/src/test/java/org/onap/aai/validation/reader/TestEventReader.java @@ -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 { 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 bbceae5..4432dfa 100644 --- a/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java +++ b/src/test/java/org/onap/aai/validation/reader/TestOxmReader.java @@ -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 { 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 7ce0b34..d1833f0 100644 --- a/src/test/java/org/onap/aai/validation/result/TestValidationResult.java +++ b/src/test/java/org/onap/aai/validation/result/TestValidationResult.java @@ -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 { diff --git a/src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java b/src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java index b87e4af..3695fca 100644 --- a/src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java +++ b/src/test/java/org/onap/aai/validation/ruledriven/mock/TestDefaultRules.java @@ -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 { diff --git a/src/test/java/org/onap/aai/validation/ruledriven/validator/TestDataDictionary.java b/src/test/java/org/onap/aai/validation/ruledriven/validator/TestDataDictionary.java index 7292dec..108ee30 100644 --- a/src/test/java/org/onap/aai/validation/ruledriven/validator/TestDataDictionary.java +++ b/src/test/java/org/onap/aai/validation/ruledriven/validator/TestDataDictionary.java @@ -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 { 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 27039a0..f33e9e9 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 @@ -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 { 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 c975d16..6090576 100644 --- a/src/test/java/org/onap/aai/validation/services/TestInfoService.java +++ b/src/test/java/org/onap/aai/validation/services/TestInfoService.java @@ -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 { diff --git a/src/test/resources/data-dictionary/test-data-dictionary-beans.xml b/src/test/resources/data-dictionary/test-data-dictionary-beans.xml index 78a92f1..4bbb1af 100644 --- a/src/test/resources/data-dictionary/test-data-dictionary-beans.xml +++ b/src/test/resources/data-dictionary/test-data-dictionary-beans.xml @@ -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" /> diff --git a/src/test/resources/oxm-reader/oxm-reader-beans.xml b/src/test/resources/oxm-reader/oxm-reader-beans.xml index 93a2ff7..a85c081 100644 --- a/src/test/resources/oxm-reader/oxm-reader-beans.xml +++ b/src/test/resources/oxm-reader/oxm-reader-beans.xml @@ -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 index 34c8796..0000000 --- a/src/test/resources/oxm-reader/schemaIngest.properties +++ /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 diff --git a/src/test/resources/data-dictionary/schemaIngest.properties b/src/test/resources/schema-ingest.properties index 317f478..bdde478 100644 --- a/src/test/resources/data-dictionary/schemaIngest.properties +++ b/src/test/resources/schema-ingest.properties @@ -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 |