summaryrefslogtreecommitdiffstats
path: root/cds-regression-test/cba/remote-python/Scripts/python
diff options
context:
space:
mode:
Diffstat (limited to 'cds-regression-test/cba/remote-python/Scripts/python')
-rw-r--r--cds-regression-test/cba/remote-python/Scripts/python/EchoRemotePython.py13
-rw-r--r--cds-regression-test/cba/remote-python/Scripts/python/FailingRemotePython.py15
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)