aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/datafilecollector-testharness/simulator-group
diff options
context:
space:
mode:
authorTamasBakai <tamas.bakai@est.tech>2019-08-15 08:25:27 +0000
committerDaniel Rose <dr695h@att.com>2019-08-15 14:14:18 +0000
commitfa357dfc37bb5a71689a8390a287f7ec74a3fdd9 (patch)
tree3e0694bd1f0ba05a291ff9a537d3e73161b95552 /test/mocks/datafilecollector-testharness/simulator-group
parent1160da46b6fd3a98608e59ca82c14529af94edbd (diff)
Simulator integration for CSIT of generalized DfC
Issue-ID: DCAEGEN2-1719 Change-Id: I963cfaef30bc4e85d76fecddd310f091e8c00bd0 Signed-off-by: TamasBakai <tamas.bakai@est.tech>
Diffstat (limited to 'test/mocks/datafilecollector-testharness/simulator-group')
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json2
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json32
-rw-r--r--test/mocks/datafilecollector-testharness/simulator-group/consul/consul_config.json0
-rwxr-xr-xtest/mocks/datafilecollector-testharness/simulator-group/consul_config.sh19
-rwxr-xr-xtest/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh2
5 files changed, 39 insertions, 16 deletions
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
index 9974c187f..8b87a5c3a 100644
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
@@ -24,7 +24,7 @@
"streams_subscribes":{
"dmaap_subscriber":{
"dmaap_info":{
- "topic_url":"http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+ "topic_url":"http://dradmin:dradmin@dfc_mr-sim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
},
"type":"message_router"
}
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json
new file mode 100644
index 000000000..9974c187f
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json
@@ -0,0 +1,32 @@
+{
+ "dmaap.ftpesConfig.keyCert":"config/dfc.jks",
+ "dmaap.ftpesConfig.keyPassword":"secret",
+ "dmaap.ftpesConfig.trustedCa":"config/ftp.jks",
+ "dmaap.ftpesConfig.trustedCaPassword":"secret",
+ "dmaap.security.trustStorePath":"change it",
+ "dmaap.security.trustStorePasswordPath":"trustStorePasswordPath",
+ "dmaap.security.keyStorePath":"keyStorePath",
+ "dmaap.security.keyStorePasswordPath":"change it",
+ "dmaap.security.enableDmaapCertAuth":"false",
+ "streams_publishes":{
+ "PM_MEAS_FILES":{
+ "type":"data_router",
+ "dmaap_info":{
+ "username": "user",
+ "log_url": "https://drsim:3907/feedlog/2",
+ "publish_url": "https://drsim:3907/publish/2",
+ "location": "loc00",
+ "password": "password",
+ "publisher_id": "972.360gm"
+ }
+ }
+ },
+ "streams_subscribes":{
+ "dmaap_subscriber":{
+ "dmaap_info":{
+ "topic_url":"http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+ },
+ "type":"message_router"
+ }
+ }
+}
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul/consul_config.json b/test/mocks/datafilecollector-testharness/simulator-group/consul/consul_config.json
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul/consul_config.json
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh b/test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh
index a3492b93d..5e8f7e2d4 100755
--- a/test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh
+++ b/test/mocks/datafilecollector-testharness/simulator-group/consul_config.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+bash -x
# Script to configure consul with json configuration files with 'localhost' urls. This
# is needed when running the simulator as as a stand-alone app or via a dfc container in 'host' network mode.
@@ -24,20 +25,10 @@ if ! [ -f $3 ]; then
exit 1
fi
-if [ $1 == "app" ]; then
- appname=$DFC_APP_BASE$2
- echo "Replacing 'mrsim' with 'localhost' in json app config for consul"
- sed 's/mrsim/localhost/g' $3 > .tmp_file.json
-elif [ $1 == "dmaap" ]; then
- appname=$DFC_APP_BASE$2":dmaap"
- echo "Replacing 'drsim' with 'localhost' in json dmaap config for consul"
- sed 's/drsim/localhost/g' $3 > .tmp_file.json
-else
- __print_err "config type should be 'app' or 'dmaap'"
- exit 1
-fi
-
echo "Configuring consul for " $appname " from " $3
-curl -s http://127.0.0.1:${CONSUL_PORT}/v1/kv/${appname}?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary "@"$tmp_file.json >/dev/null
+curl -s http://127.0.0.1:${CONSUL_PORT}/v1/kv/${appname}?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary "@"$3
+
+echo "Reading back from consul:"
+curl "http://127.0.0.1:${CONSUL_PORT}/v1/kv/${appname}?dc=dc1&raw=0"
echo "done" \ No newline at end of file
diff --git a/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh b/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
index 82ad6aa1e..9370f99a6 100755
--- a/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
+++ b/test/mocks/datafilecollector-testharness/simulator-group/simulators-start.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-
+set -x
server_check() {
for i in {1..10}; do
res=$(curl -s -o /dev/null -w "%{http_code}" localhost:$2$3)