summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-07-12 10:52:39 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-08-06 08:35:34 +0200
commit3cd31c39b0ea2a4db9c03534761519f94101f6c8 (patch)
tree3364ccd530791e6efcfdaf8bd29e3000ab5736b9 /src/test
parent6fb0e1ab36f343c97d88666262e270db91f72505 (diff)
Update Janusgraph to 0.6.0 in graphadmin
- update Janusgraph (0.5.3 -> 0.6.0) - update Tinkerpop (3.4.13 -> 3.5.1) - bump version to 1.14.5-SNAPSHOT Issue-ID: AAI-3929 Change-Id: I75bccadca63eb7cd67bd8f9ebbb8d79978138bcc Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/aai/AAIGremlinQueryTest.java4
-rw-r--r--src/test/java/org/onap/aai/AAISetup.java7
-rw-r--r--src/test/java/org/onap/aai/MetricsConfigurationTest.java5
-rw-r--r--src/test/resources/etc/appprops/aaiconfig.properties161
4 files changed, 174 insertions, 3 deletions
diff --git a/src/test/java/org/onap/aai/AAIGremlinQueryTest.java b/src/test/java/org/onap/aai/AAIGremlinQueryTest.java
index 55506a9..96d05db 100644
--- a/src/test/java/org/onap/aai/AAIGremlinQueryTest.java
+++ b/src/test/java/org/onap/aai/AAIGremlinQueryTest.java
@@ -29,6 +29,9 @@ import org.onap.aai.exceptions.AAIException;
import org.onap.aai.util.AAIConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.server.LocalServerPort;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
+import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Import;
import org.springframework.http.*;
@@ -60,6 +63,7 @@ import static org.junit.Assert.fail;
* they will be testing against the same thing except fitnesse uses hbase
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = GraphAdminApp.class)
+@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test
@ContextConfiguration(initializers = PropertyPasswordConfiguration.class)
@Import(GraphAdminTestConfiguration.class)
@TestPropertySource(
diff --git a/src/test/java/org/onap/aai/AAISetup.java b/src/test/java/org/onap/aai/AAISetup.java
index 2f502a8..d742ff1 100644
--- a/src/test/java/org/onap/aai/AAISetup.java
+++ b/src/test/java/org/onap/aai/AAISetup.java
@@ -34,6 +34,7 @@ import org.onap.aai.introspection.LoaderFactory;
import org.onap.aai.introspection.MoxyLoader;
import org.onap.aai.nodes.NodeIngestor;
import org.onap.aai.rest.db.HttpEntry;
+import org.onap.aai.rest.notification.NotificationService;
import org.onap.aai.serialization.db.EdgeSerializer;
import org.onap.aai.setup.AAIConfigTranslator;
import org.onap.aai.setup.SchemaVersion;
@@ -62,7 +63,9 @@ import static org.junit.Assert.assertNotNull;
DslConfiguration.class,
IntrospectionConfig.class,
XmlFormatTransformerConfiguration.class,
- RestBeanConfig.class
+ RestBeanConfig.class,
+ LoaderFactory.class,
+ NotificationService.class
})
@TestPropertySource(properties = {
"schema.uri.base.path = /aai",
@@ -137,4 +140,4 @@ public abstract class AAISetup {
String resource = IOUtils.toString(inputStream);
return resource;
}
-} \ No newline at end of file
+}
diff --git a/src/test/java/org/onap/aai/MetricsConfigurationTest.java b/src/test/java/org/onap/aai/MetricsConfigurationTest.java
index 68b2ca8..39a6673 100644
--- a/src/test/java/org/onap/aai/MetricsConfigurationTest.java
+++ b/src/test/java/org/onap/aai/MetricsConfigurationTest.java
@@ -38,9 +38,11 @@ import org.onap.aai.exceptions.AAIException;
import org.onap.aai.restclient.PropertyPasswordConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.web.server.LocalManagementPort;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
+import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration;
import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.context.annotation.Import;
import org.springframework.http.*;
@@ -57,6 +59,7 @@ import org.springframework.web.client.RestTemplate;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
classes = {SpringContextAware.class, GraphAdminApp.class})
@ContextConfiguration(initializers = PropertyPasswordConfiguration.class, classes = {SpringContextAware.class})
+@EnableAutoConfiguration(exclude={CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) // there is no running cassandra instance for the test
@Import(GraphAdminTestConfiguration.class)
@TestPropertySource(locations = "classpath:application-test.properties")
public class MetricsConfigurationTest {
diff --git a/src/test/resources/etc/appprops/aaiconfig.properties b/src/test/resources/etc/appprops/aaiconfig.properties
new file mode 100644
index 0000000..b2dd2ed
--- /dev/null
+++ b/src/test/resources/etc/appprops/aaiconfig.properties
@@ -0,0 +1,161 @@
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# Copyright © 2017-18 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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=========================================================
+
+####################################################################
+# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE
+# TEMPLATE AND *ALL* DATAFILES
+####################################################################
+
+aai.config.checktime=1000
+
+# this could come from siteconfig.pl?
+aai.config.nodename=AutomaticallyOverwritten
+
+aai.transaction.logging=true
+aai.transaction.logging.get=true
+aai.transaction.logging.post=true
+
+aai.server.url.base=https://localhost:8443/aai/
+aai.server.url=https://localhost:8443/aai/v14/
+aai.oldserver.url.base=https://localhost:8443/aai/servers/
+aai.oldserver.url=https://localhost:8443/aai/servers/v2/
+aai.global.callback.url=https://localhost:8443/aai/
+
+# Start of INTERNAL Specific Properties
+
+aai.truststore.filename=aai_keystore
+aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0
+aai.keystore.filename=aai-client-cert.p12
+aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0
+
+aai.realtime.clients=RO,SDNC,MSO,SO
+
+# End of INTERNAL Specific Properties
+
+aai.notification.current.version=v14
+aai.notificationEvent.default.status=UNPROCESSED
+aai.notificationEvent.default.eventType=AAI-EVENT
+aai.notificationEvent.default.domain=devINT1
+aai.notificationEvent.default.sourceName=aai
+aai.notificationEvent.default.sequenceNumber=0
+aai.notificationEvent.default.severity=NORMAL
+aai.notificationEvent.default.version=v14
+# This one lets us enable/disable resource-version checking on updates/deletes
+aai.resourceversion.enableflag=true
+aai.logging.maxStackTraceEntries=10
+aai.default.api.version=v14
+
+# Used by Model-processing code
+aai.model.delete.sleep.per.vtx.msec=500
+aai.model.query.resultset.maxcount=50
+aai.model.query.timeout.sec=90
+
+# Used by Data Grooming
+aai.grooming.default.max.fix=150
+aai.grooming.default.sleep.minutes=7
+
+# Used by Data Snapshot
+aai.datasnapshot.default.threads.for.create=16
+aai.datasnapshot.max.nodes.per.file.for.create=120000
+
+# Used by DupeTool
+aai.dupeTool.default.max.fix=25
+aai.dupeTool.default.sleep.minutes=7
+
+aai.model.proc.max.levels=50
+aai.edgeTag.proc.max.levels=50
+
+# Used by the ForceDelete tool
+aai.forceDel.protected.nt.list=cloud-region
+aai.forceDel.protected.edge.count=10
+aai.forceDel.protected.descendant.count=10
+
+# Used for CTAG-Pool generation
+aai.ctagPool.rangeString.vplsPe1=2001-2500
+aai.ctagPool.rangeString.vplsPe2=2501-3000
+
+aai.jms.enable=false
+
+#used by the dataGrooming and dataSnapshot cleanup tasks
+aai.cron.enable.datagroomingcleanup=true
+aai.cron.enable.datasnapshotcleanup=true
+aai.datagrooming.agezip=5
+aai.datagrooming.agedelete=30
+aai.datasnapshot.agezip=5
+aai.datasnapshot.agedelete=30
+aai.datamigration.agedelete=30
+
+#used by the dataSnapshot and dataGrooming tasks
+aai.cron.enable.dataSnapshot=true
+aai.cron.enable.dataGrooming=true
+
+#used by the dataGrooming tasks
+aai.datagrooming.enableautofix=true
+aai.datagrooming.enabledupefixon=true
+aai.datagrooming.enabledontfixorphans=true
+aai.datagrooming.enabletimewindowminutes=true
+aai.datagrooming.enableskiphostcheck=false
+aai.datagrooming.enablesleepminutes=false
+aai.datagrooming.enableedgesonly=false
+aai.datagrooming.enableskipedgechecks=false
+aai.datagrooming.enablemaxfix=false
+aai.datagrooming.enablesinglecommits=false
+aai.datagrooming.enabledupecheckoff=false
+aai.datagrooming.enableghost2checkoff=false
+aai.datagrooming.enableghost2fixon=false
+aai.datagrooming.enablef=false
+aai.datagrooming.enableskipindexupdatefix=true
+
+# used by the dataGrooming to set values
+aai.datagrooming.timewindowminutesvalue=10500
+aai.datagrooming.sleepminutesvalue=100
+aai.datagrooming.maxfixvalue=10
+aai.datagrooming.fvalue=10
+
+#timeout for traversal enabled flag
+aai.graphadmin.timeoutenabled=true
+
+#timeout app specific -1 to bypass for that app id, a whole number to override the timeout with that value (in ms)
+aai.graphadmin.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1
+
+#default timeout limit added for graphadmin if not overridden (in ms)
+aai.graphadmin.timeoutlimit=180000
+
+# Disable the process check which are oriented towards linux OS
+# These props should only be true for local on windows
+aai.disable.check.snapshot.running=true
+aai.disable.check.grooming.running=true
+
+# Specify the params listed right here that you would have send to the dataSnapshot shell script
+# JUST_TAKE_SNAPSHOT
+# THREADED_SNAPSHOT 2 DEBUG
+# THREADED_SNAPSHOT 2
+aai.datasnapshot.params=JUST_TAKE_SNAPSHOT
+
+#Data export task properties
+aai.dataexport.enable=false
+aai.dataexport.enable.schema.validation=false
+aai.dataexport.output.location=/etc/scriptdata/addmanualdata/tenant_isolation/payload
+aai.dataexport.enable.multiple.snapshots=false
+aai.dataexport.node.config.location=/etc/scriptdata/tenant_isolation/nodes.json
+aai.dataexport.input.filter.config.location=/etc/scriptdata/tenant_isolation/inputFilters.json
+aai.dataexport.enable.partial.graph=false
+
+# Threshold for margin of error (in ms) for resources_with_sot format to derive the most recent http method performed
+aai.resource.formatter.threshold=10