diff options
author | 2020-10-15 14:57:57 +0530 | |
---|---|---|
committer | 2020-11-12 14:52:33 +0100 | |
commit | d3cdace51db473c93540229da3a0fd061120957c (patch) | |
tree | d2d4f1031c7d577d51fe27b6daf1a1e80cdb409d /cds-regression-test/cba/remote-python/Scripts/python | |
parent | 8e75c091c8f2079b8ae59ae544fbd19bbef3f963 (diff) |
cds-bash script package
Issue-ID: CCSDK-2913
Change-Id: I2f97b0c78314019d5002e8563c4e433ae5e816b9
Signed-off-by: SantoshB <santosh.bayas@amdocs.com>
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'cds-regression-test/cba/remote-python/Scripts/python')
-rw-r--r-- | cds-regression-test/cba/remote-python/Scripts/python/EchoRemotePython.py | 13 | ||||
-rw-r--r-- | cds-regression-test/cba/remote-python/Scripts/python/FailingRemotePython.py | 15 |
2 files changed, 28 insertions, 0 deletions
diff --git a/cds-regression-test/cba/remote-python/Scripts/python/EchoRemotePython.py b/cds-regression-test/cba/remote-python/Scripts/python/EchoRemotePython.py new file mode 100644 index 0000000..08488da --- /dev/null +++ b/cds-regression-test/cba/remote-python/Scripts/python/EchoRemotePython.py @@ -0,0 +1,13 @@ +#!/usr/bin/python + +import sys +from cds_utils.payload_coder import send_response_data_payload + +def echo(arg): + print(arg) + +if __name__ == "__main__": + echo(sys.argv[1]) + resp_data = {"abc": ["xyz", "qqq"]} + send_response_data_payload(resp_data) + sys.exit(0) diff --git a/cds-regression-test/cba/remote-python/Scripts/python/FailingRemotePython.py b/cds-regression-test/cba/remote-python/Scripts/python/FailingRemotePython.py new file mode 100644 index 0000000..672492d --- /dev/null +++ b/cds-regression-test/cba/remote-python/Scripts/python/FailingRemotePython.py @@ -0,0 +1,15 @@ +#!/usr/bin/python + +import sys +from cds_utils.payload_coder import send_response_data_payload + +if __name__ == "__main__": + try: + raise Exception("Intentionally raised exception!") + except Exception as e: + print("Intentionally raised exception!") + resp_data = { + "errorMessage": "Intentionally raised exception!" + } + send_response_data_payload(resp_data) + sys.exit(1) |