diff options
author | Hansen, Tony (th1395) <th1395@att.com> | 2022-08-19 12:56:56 +0000 |
---|---|---|
committer | Hansen, Tony (th1395) <th1395@att.com> | 2022-08-19 12:57:10 +0000 |
commit | dac22d93c804780f2dc20164aeb44fc80a30890d (patch) | |
tree | 7bd19b04ffa5e8fb049068d9de79778eeed140de /tests/test_trapd_get_cbs_config.py | |
parent | 554b15356ef100a3617f7f5415f6a35ac2b3ebba (diff) |
lots of cleanup, no functional code changes
Change-Id: I9eefe4d34ae226bbd5a6f80422f89baeeaeb3471
Signed-off-by: Hansen, Tony (th1395) <th1395@att.com>
Issue-ID: DCAEGEN2-2837
Diffstat (limited to 'tests/test_trapd_get_cbs_config.py')
-rw-r--r-- | tests/test_trapd_get_cbs_config.py | 69 |
1 files changed, 67 insertions, 2 deletions
diff --git a/tests/test_trapd_get_cbs_config.py b/tests/test_trapd_get_cbs_config.py index ffb9bfb..75e2055 100644 --- a/tests/test_trapd_get_cbs_config.py +++ b/tests/test_trapd_get_cbs_config.py @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2022 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2019 Pantheon.tech. All rights reserved. # Copyright (c) 2021 Fujitsu Ltd. # ================================================================================ @@ -28,7 +28,72 @@ class test_get_cbs_config(unittest.TestCase): Test the trapd_get_cbs_config mod """ - pytest_json_data = '{ "heartbeat_config": { "vnfs": [{ "eventName": "Heartbeat_vDNS", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VNF", "target": "genVnfName", "version": "1.0" }, { "eventName": "Heartbeat_vFW", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VNF", "target": "genVnfName", "version": "1.0" }, { "eventName": "Heartbeat_xx", "heartbeatcountmissed": 3, "heartbeatinterval": 60, "closedLoopControlName": "ControlLoopEvent1", "policyVersion": "1.0.0.5", "policyName": "vFireWall", "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName", "target_type": "VNF", "target": "genVnfName", "version": "1.0" } ] }, "streams_publishes": { "ves_heartbeat": { "dmaap_info": { "topic_url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/" }, "type": "message_router" } }, "streams_subscribes": { "ves_heartbeat": { "dmaap_info": { "topic_url": "http://message-router:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/" }, "type": "message_router" } } }' + pytest_json_data = ( + "{" + ' "heartbeat_config": {' + ' "vnfs": [' + " {" + ' "eventName": "Heartbeat_vDNS",' + ' "heartbeatcountmissed": 3,' + ' "heartbeatinterval": 60,' + ' "closedLoopControlName": "ControlLoopEvent1",' + ' "policyVersion": "1.0.0.5",' + ' "policyName": "vFireWall",' + ' "policyScope": "resource=sampleResource,' + " type=sampletype," + ' CLName=sampleCLName",' + ' "target_type": "VNF",' + ' "target": "genVnfName",' + ' "version": "1.0"' + " }," + " {" + ' "eventName": "Heartbeat_vFW",' + ' "heartbeatcountmissed": 3,' + ' "heartbeatinterval": 60,' + ' "closedLoopControlName": "ControlLoopEvent1",' + ' "policyVersion": "1.0.0.5",' + ' "policyName": "vFireWall",' + ' "policyScope": "resource=sampleResource,' + " type=sampletype," + ' CLName=sampleCLName",' + ' "target_type": "VNF",' + ' "target": "genVnfName",' + ' "version": "1.0"' + " }," + " {" + ' "eventName": "Heartbeat_xx",' + ' "heartbeatcountmissed": 3,' + ' "heartbeatinterval": 60,' + ' "closedLoopControlName": "ControlLoopEvent1",' + ' "policyVersion": "1.0.0.5",' + ' "policyName": "vFireWall",' + ' "policyScope": "resource=sampleResource,' + " type=sampletype," + ' CLName=sampleCLName",' + ' "target_type": "VNF",' + ' "target": "genVnfName",' + ' "version": "1.0"' + " }" + " ]" + " }," + ' "streams_publishes": {' + ' "ves_heartbeat": {' + ' "dmaap_info": {' + ' "topic_url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/"' + " }," + ' "type": "message_router"' + " }" + " }," + ' "streams_subscribes": {' + ' "ves_heartbeat": {' + ' "dmaap_info": {' + ' "topic_url": "http://message-router:3904/events/unauthenticated.SEC_HEARTBEAT_INPUT/"' + " }," + ' "type": "message_router"' + " }" + " }" + "}" + ) # create copy of snmptrapd.json for pytest pytest_json_config = "/tmp/opt/app/miss_htbt_service/etc/config.json" |