From 9f330c25a03f90ae1ced491d36d1314463e6f6a4 Mon Sep 17 00:00:00 2001 From: Stavros Kanarakis Date: Tue, 3 Mar 2020 13:47:45 +0200 Subject: Align BBS-ep CSIT tests with latest code changes (DCAE-SDK upgrade) Issue-ID: DCAEGEN2-2105 Signed-off-by: Stavros Kanarakis Change-Id: I5d23ffff7e6c21bbd85eaa54147053d5d5893ec2 --- .../bbs-testcases/resources/BbsLibrary.py | 8 +++++--- .../bbs-testcases/resources/docker-compose.yml | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources') diff --git a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py index 8dbdc5a3..c58e67e2 100644 --- a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py +++ b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/BbsLibrary.py @@ -40,7 +40,8 @@ class BbsLibrary(object): Get the correlationId, oldState, newState, stateInterface, macAddress, swVersion elements from the invalid message and place the elements into a JSON object (string) as fields for comparision """ - json_to_python = json.loads(json_file) + eventString = json.loads(json_file)[0] + json_to_python = json.loads(eventString.replace("\\", "")) correlation_id = json_to_python.get("event").get("commonEventHeader").get("sourceName") oldState = json_to_python.get("event").get("stateChangeFields").get("oldState") newState = json_to_python.get("event").get("stateChangeFields").get("newState") @@ -73,7 +74,8 @@ class BbsLibrary(object): Get the correlationId, attachment-point, remote-id, cvlan, svlan, elements from the invalid message and place the elements into a JSON object (string) as fields for comparision """ - json_to_python = json.loads(json_file) + eventString = json.loads(json_file)[0] + json_to_python = json.loads(eventString.replace("\\", "")) correlation_id = json_to_python.get("correlationId") attachmentPoint = json_to_python.get("additionalFields").get("attachment-point") remoteId = json_to_python.get("additionalFields").get("remote-id") @@ -109,7 +111,7 @@ class BbsLibrary(object): python_dmaap_policy = "" try: - d_policy = python_dmaap_policy.get("policyName") + d_policy = python_dmaap_policy[0].get("policyName") except: d_policy = "" diff --git a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/docker-compose.yml b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/docker-compose.yml index f2102727..b24006d3 100644 --- a/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/docker-compose.yml +++ b/tests/dcaegen2-services-bbs-event-processor/bbs-testcases/resources/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: bbs: - image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:1.0.0 + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.bbs-event-processor:latest command: > --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap_simulator --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222 @@ -36,6 +36,10 @@ services: CONFIGS_APPLICATION_CPE-AUTHENTICATION_POLICYSCOPE: "cpe-auth_policy_scope" CONFIGS_APPLICATION_CPE-AUTHENTICATION_CLCONTROLNAME: "cpe-auth_cl" LOGGING_LEVEL_ORG_ONAP_BBS: TRACE + CONFIGS_SECURITY_TRUSTSTOREPATH: KeyStore.jks + CONFIGS_SECURITY_TRUSTSTOREPASSWORDPATH: KeyStorePass.txt + CONFIGS_SECURITY_KEYSTOREPATH: KeyStore.jks + CONFIGS_SECURITY_KEYSTOREPASSWORDPATH: KeyStorePass.txt container_name: bbs depends_on: - dmaap-bc -- cgit 1.2.3-korg