diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2020-12-04 21:44:23 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-12-04 21:44:23 +0000 |
commit | bfffa2d982cc506979aaa0b96b6bb352c8dda9a7 (patch) | |
tree | 1093505679ce13406d66b9ccc5fd78884923ea37 /cds-regression-test/test/py-executor/success | |
parent | 81b196b4c766c7dec927405da1a831cd437c5466 (diff) | |
parent | d3cdace51db473c93540229da3a0fd061120957c (diff) |
Merge "cds-bash script package"
Diffstat (limited to 'cds-regression-test/test/py-executor/success')
3 files changed, 73 insertions, 0 deletions
diff --git a/cds-regression-test/test/py-executor/success/expected-response.json b/cds-regression-test/test/py-executor/success/expected-response.json new file mode 100644 index 0000000..1318508 --- /dev/null +++ b/cds-regression-test/test/py-executor/success/expected-response.json @@ -0,0 +1,32 @@ +{ + "commonHeader": { + "timestamp": "2020-05-26T13:47:27.143Z", + "originatorId": "System", + "requestId": "123456", + "subRequestId": "1234-12234", + "flags": null + }, + "actionIdentifiers": { + "blueprintName": "RT-py-executor", + "blueprintVersion": "1.0.0", + "actionName": "remote-python", + "mode": "sync" + }, + "status": { + "code": 200, + "eventType": "EVENT_COMPONENT_EXECUTED", + "timestamp": "2020-05-26T13:47:27.193Z", + "errorMessage": null, + "message": "success" + }, + "payload": { + "remote-python-response": { + "status": "success", + "response-data": { + "HelloWorld-request": { + "hello": "world" + } + } + } + } +} diff --git a/cds-regression-test/test/py-executor/success/request-payload.json b/cds-regression-test/test/py-executor/success/request-payload.json new file mode 100644 index 0000000..f23b0de --- /dev/null +++ b/cds-regression-test/test/py-executor/success/request-payload.json @@ -0,0 +1,16 @@ +{ + "commonHeader": { + "originatorId": "System", + "requestId": "123456", + "subRequestId": "1234-12234" + }, + "actionIdentifiers": { + "blueprintName": "RT-py-executor", + "blueprintVersion": "1.0.0", + "actionName": "remote-python", + "mode": "sync" + }, + "payload": { + "remote-python-request": {} + } +} diff --git a/cds-regression-test/test/py-executor/success/test.sh b/cds-regression-test/test/py-executor/success/test.sh new file mode 100644 index 0000000..d2d064a --- /dev/null +++ b/cds-regression-test/test/py-executor/success/test.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +CBA_NAME="py-executor" +TEST_NAME="success" +TEST_NUMBER=$RANDOM + +mkdir -p "$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/" +RESPONSE_HEADERS_FILE="$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/response-headers" +RESPONSE_PAYLOAD_FILE="$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/response-payload" + +REQUEST_PAYLOAD_FILE="$TEST_DIRECTORY/$CBA_NAME/$TEST_NAME/request-payload.json" +EXPECTED_PAYLOAD_FILE="$TEST_DIRECTORY/$CBA_NAME/$TEST_NAME/expected-response.json" + +. ./$TEST_DIRECTORY/utils.sh + +echo "Running test: $CBA_NAME:$TEST_NUMBER:$TEST_NAME" + +echo 'Calling CDS process' +process_cba $REQUEST_PAYLOAD_FILE $RESPONSE_PAYLOAD_FILE $RESPONSE_HEADERS_FILE + +echo 'Assert statuscode' +assert_status_code 200 $RESPONSE_HEADERS_FILE + +echo 'Assert payload' +assert_cds_response_equals $EXPECTED_PAYLOAD_FILE $RESPONSE_PAYLOAD_FILE |