aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/m2/test/src
diff options
context:
space:
mode:
authorBruno Sakoto <bruno.sakoto@bell.ca>2020-02-14 15:53:28 -0500
committerBruno Sakoto <bruno.sakoto@bell.ca>2020-02-14 18:05:13 -0500
commit43b12b12c0c427bc89ab88f4d4034821d4c9835d (patch)
tree5994bd1b7188e3a44aeeb3a955060ccc138570ef /controlloop/m2/test/src
parentbd3b962acb4ec6f8ae4c02c9364281295239fbd1 (diff)
Change ip adresses used for m2 tests
By default Mac OS is not able to use loopback addresses other than 127.0.0.1. Issue-ID: POLICY-2368 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: Ibf4a884d2669a5f4969960963638aa213eebf172
Diffstat (limited to 'controlloop/m2/test/src')
-rw-r--r--controlloop/m2/test/src/test/java/org/onap/policy/m2/test/AppcLcmTest.java3
-rw-r--r--controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java9
-rw-r--r--controlloop/m2/test/src/test/resources/appclcm/controller.properties30
3 files changed, 32 insertions, 10 deletions
diff --git a/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/AppcLcmTest.java b/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/AppcLcmTest.java
index 3a8cffb31..b0e859dbf 100644
--- a/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/AppcLcmTest.java
+++ b/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/AppcLcmTest.java
@@ -3,6 +3,7 @@
* m2/test
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Bell Canada.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -99,7 +100,7 @@ public class AppcLcmTest {
//properties.setProperty("pdpx.password", "");
// create PolicyController, which creates the Drools session
- PolicyEngineConstants.getManager().setEnvironmentProperty(PROP_GUARD_URL, "http://127.0.71.201:8443/pdp/");
+ PolicyEngineConstants.getManager().setEnvironmentProperty(PROP_GUARD_URL, "http://127.0.0.1:8443/pdp/");
PolicyEngineConstants.getManager().setEnvironmentProperty(ONAP_KEY_URL, "jdbc:h2:file:./H2DB");
PolicyEngineConstants.getManager().setEnvironmentProperty(ONAP_KEY_USER, "sa");
PolicyEngineConstants.getManager().setEnvironmentProperty(ONAP_KEY_PASS, "");
diff --git a/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java b/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java
index e2d258cb6..48155fd88 100644
--- a/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java
+++ b/controlloop/m2/test/src/test/java/org/onap/policy/m2/test/Util.java
@@ -3,6 +3,7 @@
* m2/test
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Bell Canada.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -350,10 +351,10 @@ public class Util {
initNeeded = false;
// start DMAAP Simulator
- startRestServer("simdmaap", "127.0.71.250", 3904, SimDmaap.class);
+ startRestServer("simdmaap", "127.0.0.1", 3904, SimDmaap.class);
// start Guard Simulator
- startRestServer("simguard", "127.0.71.201", 8443, SimGuard.class);
+ startRestServer("simguard", "127.0.0.1", 8443, SimGuard.class);
// start PolicyEngine
PolicyEngineConstants.getManager().configure(new Properties());
@@ -398,7 +399,7 @@ public class Util {
PublisherBuilder builder =
new CambriaClientBuilders.PublisherBuilder();
builder
- .usingHosts("127.0.71.250")
+ .usingHosts("127.0.0.1")
.onTopic(topic)
.withSocketTimeout(5000);
publisher = builder.build();
@@ -448,7 +449,7 @@ public class Util {
ConsumerBuilder builder = new CambriaClientBuilders.ConsumerBuilder();
builder
.knownAs(UUID.randomUUID().toString(), "1")
- .usingHosts("127.0.71.250")
+ .usingHosts("127.0.0.1")
.onTopic(topic)
.waitAtServer(15000)
.receivingAtMost(100)
diff --git a/controlloop/m2/test/src/test/resources/appclcm/controller.properties b/controlloop/m2/test/src/test/resources/appclcm/controller.properties
index e4f1a8c71..6eca45733 100644
--- a/controlloop/m2/test/src/test/resources/appclcm/controller.properties
+++ b/controlloop/m2/test/src/test/resources/appclcm/controller.properties
@@ -1,3 +1,23 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP
+# ================================================================================
+# Modifications Copyright (C) 2020 Bell Canada.
+# ================================================================================
+# 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=========================================================
+###
+
# CONTROLLER section
controller.name=appclcm
@@ -8,30 +28,30 @@ dmaap.source.topics=org.onap.DCAE-APPCLCM-TOPIC
dmaap.source.topics.org.onap.DCAE-APPCLCM-TOPIC.events=org.onap.policy.controlloop.VirtualControlLoopEvent
dmaap.source.topics.org.onap.DCAE-APPCLCM-TOPIC.events.org.onap.policy.controlloop.VirtualControlLoopEvent.filter=[?($.closedLoopControlName =~ /.*/)]
dmaap.source.topics.org.onap.DCAE-APPCLCM-TOPIC.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gson
-dmaap.source.topics.org.onap.DCAE-APPCLCM-TOPIC.servers=127.0.71.250
+dmaap.source.topics.org.onap.DCAE-APPCLCM-TOPIC.servers=127.0.0.1
ueb.source.topics=APPC-RESPONSE-APPCLCM-TOPIC
ueb.source.topics.APPC-RESPONSE-APPCLCM-TOPIC.events=org.onap.policy.appclcm.AppcLcmDmaapWrapper
ueb.source.topics.APPC-RESPONSE-APPCLCM-TOPIC.events.org.onap.policy.appclcm.AppcLcmDmaapWrapper.filter=[?($.type == 'response')]
ueb.source.topics.APPC-RESPONSE-APPCLCM-TOPIC.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson
-ueb.source.topics.APPC-RESPONSE-APPCLCM-TOPIC.servers=127.0.71.250
+ueb.source.topics.APPC-RESPONSE-APPCLCM-TOPIC.servers=127.0.0.1
ueb.sink.topics=NOTIFICATION-APPCLCM-TOPIC,APPC-REQUEST-APPCLCM-TOPIC
ueb.sink.topics.APPC-REQUEST-APPCLCM-TOPIC.events=org.onap.policy.appclcm.AppcLcmDmaapWrapper
ueb.sink.topics.APPC-REQUEST-APPCLCM-TOPIC.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson
-ueb.sink.topics.APPC-REQUEST-APPCLCM-TOPIC.servers=127.0.71.250
+ueb.sink.topics.APPC-REQUEST-APPCLCM-TOPIC.servers=127.0.0.1
ueb.sink.topics.NOTIFICATION-APPCLCM-TOPIC.events=org.onap.policy.controlloop.VirtualControlLoopNotification
ueb.sink.topics.NOTIFICATION-APPCLCM-TOPIC.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gson
-ueb.sink.topics.NOTIFICATION-APPCLCM-TOPIC.servers=127.0.71.250
+ueb.sink.topics.NOTIFICATION-APPCLCM-TOPIC.servers=127.0.0.1
guard.javax.persistence.jdbc.driver=org.h2.Driver
#guard.javax.persistence.jdbc.url=jdbc:h2:file:./H2DB
#guard.javax.persistence.jdbc.user=sa
#guard.javax.persistence.jdbc.password=
-#guard.pdp.rest.url=http\://127.0.71.201\:8443/pdp/
+#guard.pdp.rest.url=http\://127.0.0.1\:8443/pdp/
rules.artifactId=appclcm
rules.groupId=org.onap.policy.m2.test