Use env variable for DMaaP read and write topics
Change-Id: I9ab2456b94b6ad5a9203071dd9708f3bfa34a186
Isue-ID: NONRTRIC-476
Signed-off-by: elinuxhenrik <henrik.b.andersson@est.tech>
diff --git a/test/common/mr_api_functions.sh b/test/common/mr_api_functions.sh
old mode 100644
new mode 100755
index 1c2f155..45d0931
--- a/test/common/mr_api_functions.sh
+++ b/test/common/mr_api_functions.sh
@@ -580,9 +580,9 @@
__create_topic $MR_WRITE_TOPIC "Topic for writing policy messages"
- __dmaap_pipeclean $MR_READ_TOPIC "/events/A1-POLICY-AGENT-READ" "/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=1000&limit=100"
+ __dmaap_pipeclean $MR_READ_TOPIC "/events/$MR_READ_TOPIC" "/events/$MR_READ_TOPIC/users/policy-agent?timeout=1000&limit=100"
- __dmaap_pipeclean $MR_WRITE_TOPIC "/events/A1-POLICY-AGENT-WRITE" "/events/A1-POLICY-AGENT-WRITE/users/mr-stub?timeout=1000&limit=100"
+ __dmaap_pipeclean $MR_WRITE_TOPIC "/events/$MR_WRITE_TOPIC" "/events/$MR_WRITE_TOPIC/users/mr-stub?timeout=1000&limit=100"
echo " Current topics:"
curlString="$MR_DMAAP_PATH/topics"
diff --git a/test/common/test_env-onap-guilin.sh b/test/common/test_env-onap-guilin.sh
old mode 100644
new mode 100755
index f5cf837..0895947
--- a/test/common/test_env-onap-guilin.sh
+++ b/test/common/test_env-onap-guilin.sh
@@ -195,10 +195,10 @@
MR_STUB_LOCALHOST_PORT=3908 # MR stub container external port (host -> container)
MR_DMAAP_LOCALHOST_SECURE_PORT=3905 # MR stub container internal port (container -> container)
MR_STUB_LOCALHOST_SECURE_PORT=3909 # MR stub container external secure port (host -> container)
-MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
-MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" # Path write messages to MR
MR_READ_TOPIC="A1-POLICY-AGENT-READ" # Read topic
MR_WRITE_TOPIC="A1-POLICY-AGENT-WRITE" # Write topic
+MR_READ_URL="/events/$MR_READ_TOPIC/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+MR_WRITE_URL="/events/$MR_WRITE_TOPIC" # Path to write messages to MR
MR_STUB_ALIVE_URL="/" # Base path for mr stub alive check
MR_DMAAP_ALIVE_URL="/topics" # Base path for dmaap-mr alive check
MR_DMAAP_COMPOSE_DIR="dmaapmr" # Dir in simulator_group for dmaap mr for - docker-compose
diff --git a/test/common/test_env-onap-honolulu.sh b/test/common/test_env-onap-honolulu.sh
old mode 100644
new mode 100755
index 8ab85f0..b738755
--- a/test/common/test_env-onap-honolulu.sh
+++ b/test/common/test_env-onap-honolulu.sh
@@ -237,10 +237,10 @@
MR_STUB_LOCALHOST_PORT=3908 # MR stub container external port (host -> container)
MR_DMAAP_LOCALHOST_SECURE_PORT=3905 # MR stub container internal port (container -> container)
MR_STUB_LOCALHOST_SECURE_PORT=3909 # MR stub container external secure port (host -> container)
-MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
-MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" # Path write messages to MR
MR_READ_TOPIC="A1-POLICY-AGENT-READ" # Read topic
MR_WRITE_TOPIC="A1-POLICY-AGENT-WRITE" # Write topic
+MR_READ_URL="/events/$MR_READ_TOPIC/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+MR_WRITE_URL="/events/$MR_WRITE_TOPIC" # Path to write messages to MR
MR_STUB_ALIVE_URL="/" # Base path for mr stub alive check
MR_DMAAP_ALIVE_URL="/topics" # Base path for dmaap-mr alive check
MR_DMAAP_COMPOSE_DIR="dmaapmr" # Dir in simulator_group for dmaap mr for - docker-compose
diff --git a/test/common/test_env-oran-cherry.sh b/test/common/test_env-oran-cherry.sh
index a59c0e0..9039b8d 100755
--- a/test/common/test_env-oran-cherry.sh
+++ b/test/common/test_env-oran-cherry.sh
@@ -240,10 +240,10 @@
MR_STUB_LOCALHOST_PORT=3908 # MR stub container external port (host -> container)
MR_DMAAP_LOCALHOST_SECURE_PORT=3905 # MR stub container internal port (container -> container)
MR_STUB_LOCALHOST_SECURE_PORT=3909 # MR stub container external secure port (host -> container)
-MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
-MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" # Path write messages to MR
MR_READ_TOPIC="A1-POLICY-AGENT-READ" # Read topic
MR_WRITE_TOPIC="A1-POLICY-AGENT-WRITE" # Write topic
+MR_READ_URL="/events/$MR_READ_TOPIC/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+MR_WRITE_URL="/events/$MR_WRITE_TOPIC" # Path to write messages to MR
MR_STUB_ALIVE_URL="/" # Base path for mr stub alive check
MR_DMAAP_ALIVE_URL="/topics" # Base path for dmaap-mr alive check
MR_DMAAP_COMPOSE_DIR="dmaapmr" # Dir in simulator_group for dmaap mr for - docker-compose
diff --git a/test/common/test_env-oran-dawn.sh b/test/common/test_env-oran-dawn.sh
index 1890b71..e9b82f6 100755
--- a/test/common/test_env-oran-dawn.sh
+++ b/test/common/test_env-oran-dawn.sh
@@ -259,10 +259,10 @@
MR_STUB_LOCALHOST_PORT=3908 # MR stub container external port (host -> container)
MR_DMAAP_LOCALHOST_SECURE_PORT=3905 # MR stub container internal port (container -> container)
MR_STUB_LOCALHOST_SECURE_PORT=3909 # MR stub container external secure port (host -> container)
-MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
-MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" # Path write messages to MR
MR_READ_TOPIC="A1-POLICY-AGENT-READ" # Read topic
MR_WRITE_TOPIC="A1-POLICY-AGENT-WRITE" # Write topic
+MR_READ_URL="/events/$MR_READ_TOPIC/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+MR_WRITE_URL="/events/$MR_WRITE_TOPIC" # Path to write messages to MR
MR_STUB_ALIVE_URL="/" # Base path for mr stub alive check
MR_DMAAP_ALIVE_URL="/topics" # Base path for dmaap-mr alive check
MR_DMAAP_COMPOSE_DIR="dmaapmr" # Dir in simulator_group for dmaap mr for - docker-compose