Update tests for Datafile Collector (DCAE SDK update) 83/111683/3
authorRemigiusz Janeczek <remigiusz.janeczek@nokia.com>
Tue, 25 Aug 2020 12:36:16 +0000 (14:36 +0200)
committerKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Fri, 28 Aug 2020 07:34:28 +0000 (07:34 +0000)
Adjust DFC consul configs
Make message router sim return array of strings instead of array of
json objects as response (as in live environment)

Issue-ID: DCAEGEN2-2267
Signed-off-by: Remigiusz Janeczek <remigiusz.janeczek@nokia.com>
Change-Id: I792c9abcb1c49d73a790ca9c2e8f46a0e1dfd099

16 files changed:
test/mocks/datafilecollector-testharness/common/test_env.sh
test/mocks/datafilecollector-testharness/common/testcase_common.sh
test/mocks/datafilecollector-testharness/mr-sim/mr-sim.py
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed1_PM_feed2_CTR.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_CTR_feed3_LOG_TEMP.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_MEAS_no_strict_host_key_checking.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed2_PM_secureMR.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c12_feed3_PM_CTR.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c13_feed2_CTR.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c14_feed3_LOG.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c15_feed1_PM_feed4_TEST.json
test/mocks/datafilecollector-testharness/simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json

index 63c0f2e..cc96ce8 100644 (file)
@@ -25,6 +25,7 @@ DOCKER_SIM_NWNAME="dfcnet"             #Name of docker private network
 CONSUL_HOST="consul-server"            #Host name of consul
 CONSUL_PORT=8500                       #Port number of consul
 CONFIG_BINDING_SERVICE="config-binding-service"  #Host name of CBS
+CONFIG_BINDING_SERVICE_SERVICE_PORT=10000  #CBS port
 MR_PORT=2222                           #MR simulator port number http
 DR_PORT=3906                           #DR simulator port number http
 DR_PORT_SECURE=3907                    #DR simulator port number for https
index d2072c1..61f3c5d 100755 (executable)
@@ -375,7 +375,7 @@ __start_dfc_image() {
        docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME
 
        echo "Starting DFC: " $appname " with ports mapped to " $localport " and " $localport_secure " in docker network "$DOCKER_SIM_NWNAME
-       docker run -d --volume $(pwd)/../simulator-group/tls/:/opt/app/datafile/etc/cert/ -p $localport":8100" -p $localport_secure":8433" --network=$DOCKER_SIM_NWNAME -e CONSUL_HOST=$CONSUL_HOST -e CONSUL_PORT=$CONSUL_PORT -e CONFIG_BINDING_SERVICE=$CONFIG_BINDING_SERVICE -e HOSTNAME=$appname --name $appname $DFC_IMAGE
+       docker run -d --volume $(pwd)/../simulator-group/tls/:/opt/app/datafile/etc/cert/ -p $localport":8100" -p $localport_secure":8433" --network=$DOCKER_SIM_NWNAME -e CONSUL_HOST=$CONSUL_HOST -e CONSUL_PORT=$CONSUL_PORT -e CONFIG_BINDING_SERVICE=$CONFIG_BINDING_SERVICE -e CONFIG_BINDING_SERVICE_SERVICE_PORT=$CONFIG_BINDING_SERVICE_SERVICE_PORT -e HOSTNAME=$appname --name $appname $DFC_IMAGE
        sleep 3
        set +x
        dfc_started=false
index f2b781b..982f4b8 100644 (file)
@@ -1147,7 +1147,7 @@ def getEventHead(groupIndex, changeId, nodename):
     global pnfMap
     pnfMap[groupIndex].add(nodename)
     headStr = """
-        {
+        '{
           "event": {
             "commonEventHeader": {
               "startEpochMicrosec": 8745745764578,
@@ -1203,7 +1203,7 @@ def getEventEnd():
               ]
             }
           }
-        }
+        }'
         """
     return endStr
 
index 2defeb0..f839e79 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "PM_MEAS_FILES": {
@@ -25,7 +28,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://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index dea4e2e..89a4907 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "PM_MEAS_FILES": {
@@ -36,7 +39,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://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 2cdb656..dbd4165 100644 (file)
@@ -8,11 +8,14 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_subscribes": {
     "dmaap_subscriber": {
       "dmaap_info": {
-        "topic_url": "http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+        "topic_url": "http://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 8d76b43..fee8a0f 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "CTR_MEAS_FILES": {
@@ -47,7 +50,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://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 8243ddd..5a297d2 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "PM_MEAS_FILES": {
@@ -25,7 +28,7 @@
   "streams_subscribes": {
     "dmaap_subscriber": {
       "dmaap_info": {
-        "topic_url": "http://dradmin:dradmin@dfc_mr-sim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+        "topic_url": "http://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index d041852..5a297d2 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "PM_MEAS_FILES": {
@@ -25,7 +28,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://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 2b0defb..8ab1438 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "false",
   "streams_publishes": {
     "PM_MEAS_FILES": {
@@ -25,7 +28,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://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index ace7cbb..5a297d2 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "PM_MEAS_FILES": {
@@ -25,7 +28,7 @@
   "streams_subscribes": {
     "dmaap_subscriber": {
       "dmaap_info": {
-        "topic_url": "https://dradmin:dradmin@mrsim:2223/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12"
+        "topic_url": "http://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 2fe61ee..4e6b1fd 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c12",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C12",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "PM_MEAS_FILES": {
@@ -36,7 +39,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://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 27d3eb8..599ad74 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c13",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C13",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "CTR_MEAS_FILES": {
@@ -25,7 +28,7 @@
   "streams_subscribes": {
     "dmaap_subscriber": {
       "dmaap_info": {
-        "topic_url": "http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c13/C13"
+        "topic_url": "http://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 0bbd159..8e96210 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c14",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C14",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "LOG_FILES": {
@@ -25,7 +28,7 @@
   "streams_subscribes": {
     "dmaap_subscriber": {
       "dmaap_info": {
-        "topic_url": "http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c14/C14"
+        "topic_url": "http://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 6fac2c2..4b53898 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c15",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C15",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "PM_MEAS_FILES": {
@@ -36,7 +39,7 @@
   "streams_subscribes": {
     "dmaap_subscriber": {
       "dmaap_info": {
-        "topic_url": "http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c15/C15"
+        "topic_url": "http://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }
index 7d0d9e0..f0fc2cb 100644 (file)
@@ -8,6 +8,9 @@
   "dmaap.security.keyStorePath": "/opt/app/datafile/etc/cert/cert.jks",
   "dmaap.security.keyStorePasswordPath": "/opt/app/datafile/etc/cert/jks.pass",
   "dmaap.security.enableDmaapCertAuth": "false",
+  "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDcae-c15",
+  "dmaap.dmaapConsumerConfiguration.consumerId": "C15",
+  "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
   "sftp.security.strictHostKeyChecking": "true",
   "streams_publishes": {
     "TEST_FILES": {
@@ -36,7 +39,7 @@
   "streams_subscribes": {
     "dmaap_subscriber": {
       "dmaap_info": {
-        "topic_url": "http://dradmin:dradmin@mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c15/C15"
+        "topic_url": "http://mrsim:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
       },
       "type": "message_router"
     }