aboutsummaryrefslogtreecommitdiffstats
path: root/aai-schema-ingest/src/test
diff options
context:
space:
mode:
authorHarish Venkata Kajur <vk250x@att.com>2020-02-26 17:38:15 -0500
committerjimmy <jf2512@att.com>2020-03-03 16:54:47 -0500
commit6f0577db0cc8bd169d5d420e22b576397817f8bd (patch)
tree22c084b168ba2b3452097dec34c36dc0fbddf9f1 /aai-schema-ingest/src/test
parent7c57239a9ccc5ae1d33873e62b9798fafb66b360 (diff)
Update aai-common to be spring boot 2 compatible
Issue-ID: AAI-2806 Change-Id: Idad79373209ef25bb26551253aa8ad86e4a75549 Signed-off-by: Harish Venkata Kajur <vk250x@att.com>
Diffstat (limited to 'aai-schema-ingest/src/test')
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java6
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java5
-rw-r--r--aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java2
-rw-r--r--aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml4
4 files changed, 12 insertions, 5 deletions
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java
index 8fdce62b..a9cd1f74 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/edges/EdgeIngestorTest.java
@@ -50,8 +50,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {MockProvider.class, EdgesConfiguration.class})
@TestPropertySource(
- properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties"})
-
+ properties = {
+ "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-wiring-test.properties",
+ "spring.main.allow-bean-definition-overriding=true"
+ })
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@SpringBootTest
public class EdgeIngestorTest {
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java
index 7035affd..dc4e1e46 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/nodes/NodeIngestorTest.java
@@ -51,7 +51,10 @@ import org.w3c.dom.Document;
@RunWith(SpringJUnit4ClassRunner.class)
@TestPropertySource(
- properties = {"schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-ss-wiring-test.properties"})
+ properties = {
+ "schema.ingest.file = src/test/resources/forWiringTests/schema-ingest-ss-wiring-test.properties",
+ "spring.main.allow-bean-definition-overriding=true"
+ })
@ContextConfiguration(classes = {MockProvider.class, NodesConfiguration.class})
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
diff --git a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java
index af94765f..2a5068f2 100644
--- a/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java
+++ b/aai-schema-ingest/src/test/java/org/onap/aai/setup/SchemaLocationsBeanXMLSetterWithPropFileTest.java
@@ -23,12 +23,14 @@ package org.onap.aai.setup;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+@Ignore("Support of schema ingest via context configuration with prop file is removed as it won't work with spring boot 2")
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:forWiringTests/testUsingPropFileContext.xml"})
public class SchemaLocationsBeanXMLSetterWithPropFileTest {
diff --git a/aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml b/aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml
index 1d3e61e4..b4e2c026 100644
--- a/aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml
+++ b/aai-schema-ingest/src/test/resources/forWiringTests/testUsingPropFileContext.xml
@@ -14,6 +14,6 @@
<property name="edgeDirectory" value="${schema.edges.location}" />
</bean>
- <context:property-placeholder location="classpath:forWiringTests/schema-ingest-for-xml-test.properties" ignore-unresolvable="true" />
+ <context:property-placeholder location="/forWiringTests/schema-ingest-for-xml-test.properties" ignore-unresolvable="true" />
-</beans> \ No newline at end of file
+</beans>