diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2021-01-21 14:17:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-01-21 14:17:58 +0000 |
commit | 2a26e7f038190ef736a73443ee56169fea6815a9 (patch) | |
tree | 4822f88f7fc70277f6559c198ee7cb4277d4eaeb /cds-regression-test/test/resource-resolution | |
parent | 8908c43db11c2eecc2b6e730a5c99f6ec3091a95 (diff) | |
parent | e92fce768cb792f11920f45fdbb38b3af69e212f (diff) |
Merge "Update to latest version"honolulu
Diffstat (limited to 'cds-regression-test/test/resource-resolution')
20 files changed, 0 insertions, 586 deletions
diff --git a/cds-regression-test/test/resource-resolution/data-dict/RT-db.json b/cds-regression-test/test/resource-resolution/data-dict/RT-db.json deleted file mode 100644 index d8e1daf..0000000 --- a/cds-regression-test/test/resource-resolution/data-dict/RT-db.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "RT-db", - "data_type": "string", - "description": "DB request for regression test", - "tags": "datetime", - "updatedBy": "Selfish", - "definition": { - "name": "RT-db", - "tags": "RT-db", - "updated-by": "Selffish", - "property": { - "description": "DB request for regression test", - "type": "string" - }, - "sources": { - "processor-db": { - "type": "source-db", - "properties": { - "endpoint-selector": "db-endpoint", - "type": "SQL", - "query": "select sdnctl.RESOURCE_RESOLUTION.value from sdnctl.RESOURCE_RESOLUTION where value='ok'", - "input-key-mapping": {}, - "output-key-mapping": { - "value": "value" - } - } - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/data-dict/RT-kotlin.json b/cds-regression-test/test/resource-resolution/data-dict/RT-kotlin.json deleted file mode 100644 index c521792..0000000 --- a/cds-regression-test/test/resource-resolution/data-dict/RT-kotlin.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "kotlin-script", - "data_type": "string", - "description": "Kotlin script used to read properties.", - "tags": "kotlin-script", - "updatedBy": "Self-fish", - "definition": { - "name": "kotlin-script", - "updated-by": "Selffish", - "tags": "properties-capability-source", - "property": { - "description": "Kotlin script used to read properties.", - "type": "string" - }, - "sources": { - "capability": { - "type": "source-capability", - "properties": { - "script-type": "kotlin", - "script-class-reference": "cba.cds.RT.ResolvPropertiesKt", - "instance-dependencies": [] - } - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-delete.json b/cds-regression-test/test/resource-resolution/data-dict/RT-rest-delete.json deleted file mode 100644 index c1cef3b..0000000 --- a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-delete.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "RT-rest-delete", - "data_type": "string", - "description": "Rest DELETE request for regression test", - "tags": "RT-rest-delete", - "updatedBy": "Selfish", - "definition": { - "name": "RT-rest-delete", - "tags": "RT-rest-delete", - "updated-by": "Selffish", - "property": { - "description": "Rest DELETE request for regression test", - "type": "string" - }, - "sources": { - "sdnc": { - "type": "source-rest", - "properties": { - "type": "string", - "verb": "DELETE", - "url-path": "/delete", - "endpoint-selector": "rest-endpoint", - "path": "", - "input-key-mapping": {}, - "output-key-mapping": { - "value": "value" - } - } - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-get.json b/cds-regression-test/test/resource-resolution/data-dict/RT-rest-get.json deleted file mode 100644 index 210ac27..0000000 --- a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-get.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "RT-rest-get", - "data_type": "string", - "description": "Rest GET request for regression test", - "tags": "RT-rest-get", - "updatedBy": "Selfish", - "definition": { - "name": "RT-rest-get", - "tags": "RT-rest-get", - "updated-by": "Selffish", - "property": { - "description": "Rest GET request for regression test", - "type": "string" - }, - "sources": { - "sdnc": { - "type": "source-rest", - "properties": { - "type": "string", - "verb": "GET", - "url-path": "/get", - "endpoint-selector": "rest-endpoint", - "path": "", - "input-key-mapping": {}, - "output-key-mapping": { - "value": "value" - } - } - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-patch.json b/cds-regression-test/test/resource-resolution/data-dict/RT-rest-patch.json deleted file mode 100644 index 41f94da..0000000 --- a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-patch.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "RT-rest-patch", - "data_type": "string", - "description": "Rest PATCH request for regression test", - "tags": "RT-rest-patch", - "updatedBy": "Selfish", - "definition": { - "name": "RT-rest-patch", - "tags": "RT-rest-patch", - "updated-by": "Selffish", - "property": { - "description": "Rest PATCH request for regression test", - "type": "string" - }, - "sources": { - "sdnc": { - "type": "source-rest", - "properties": { - "type": "string", - "verb": "PATCH", - "url-path": "/patch", - "endpoint-selector": "rest-endpoint", - "path": "", - "input-key-mapping": {}, - "output-key-mapping": { - "value": "value" - } - } - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-post.json b/cds-regression-test/test/resource-resolution/data-dict/RT-rest-post.json deleted file mode 100644 index 63721bb..0000000 --- a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-post.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "RT-rest-post", - "data_type": "string", - "description": "Rest POST request for regression test", - "tags": "RT-rest-post", - "updatedBy": "Selfish", - "definition": { - "name": "RT-rest-post", - "tags": "RT-rest-post", - "updated-by": "Selffish", - "property": { - "description": "Rest POST request for regression test", - "type": "string" - }, - "sources": { - "sdnc": { - "type": "source-rest", - "properties": { - "type": "string", - "verb": "POST", - "url-path": "/post", - "endpoint-selector": "rest-endpoint", - "path": "", - "input-key-mapping": {}, - "output-key-mapping": { - "value": "value" - } - } - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-put.json b/cds-regression-test/test/resource-resolution/data-dict/RT-rest-put.json deleted file mode 100644 index cf165d3..0000000 --- a/cds-regression-test/test/resource-resolution/data-dict/RT-rest-put.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "RT-rest-put", - "data_type": "string", - "description": "Rest PUT request for regression test", - "tags": "RT-rest-put", - "updatedBy": "Selfish", - "definition": { - "name": "RT-rest-put", - "tags": "RT-rest-put", - "updated-by": "Selffish", - "property": { - "description": "Rest PUT request for regression test", - "type": "string" - }, - "sources": { - "sdnc": { - "type": "source-rest", - "properties": { - "type": "string", - "verb": "PUT", - "url-path": "/put", - "endpoint-selector": "rest-endpoint", - "path": "", - "input-key-mapping": {}, - "output-key-mapping": { - "value": "value" - } - } - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/dummy-request-payload.json b/cds-regression-test/test/resource-resolution/dummy-request-payload.json deleted file mode 100644 index 60b3442..0000000 --- a/cds-regression-test/test/resource-resolution/dummy-request-payload.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "commonHeader": { - "originatorId": "System", - "requestId": "dummy-request-should-fail", - "subRequestId": "11" - }, - "actionIdentifiers": { - "blueprintName": "RT-resource-resolution", - "blueprintVersion": "1.0.0", - "actionName": "dummy", - "mode": "sync" - }, - "payload": {} -} diff --git a/cds-regression-test/test/resource-resolution/force-resolution/expected-payloads/expected-response-1.json b/cds-regression-test/test/resource-resolution/force-resolution/expected-payloads/expected-response-1.json deleted file mode 100644 index efb6282..0000000 --- a/cds-regression-test/test/resource-resolution/force-resolution/expected-payloads/expected-response-1.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "correlationUUID": null, - "commonHeader": { - "timestamp": "2020-05-07T22:18:06.901Z", - "originatorId": "System", - "requestId": "1234", - "subRequestId": "1234-12234", - "flags": null - }, - "actionIdentifiers": { - "blueprintName": "RT-resource-resolution", - "blueprintVersion": "1.0.0", - "actionName": "resource-resolution", - "mode": "sync" - }, - "status": { - "code": 200, - "eventType": "EVENT_COMPONENT_EXECUTED", - "timestamp": "2020-05-07T22:18:22.289Z", - "errorMessage": null, - "message": "success" - }, - "payload": { - "resource-resolution-response": { - "meshed-template": { - "helloworld-velocity": "{\n \"default\": \"ok\",\n \"input\": \"ok\",\n \"script\": {\n \"python\": \"ok\",\n \"kotlin\": \"ok\"\n },\n \"db\": \"ok\",\n \"rest\": {\n \"GET\": \"get:ok\",\n \"POST\": \"post:ok\",\n \"PUT\": \"put:ok\",\n \"PATCH\": \"patch:ok\",\n \"DELETE\": \"delete:ok\"\n }\n}\n", - "helloworld-jinja": "{\n \"default\": \"ok\",\n \"input\": \"ok\",\n \"script\": {\n \"python\": \"ok\",\n \"kotlin\": {\n \"base\": \"ok\"\n \"from suspend function\": \"ok\"\n }\n },\n \"db\": \"ok\",\n \"rest\": {\n \"GET\": \"get:ok\",\n \"POST\": \"post:ok\",\n \"PUT\": \"put:ok\",\n \"PATCH\": \"patch:ok\",\n \"DELETE\": \"delete:ok\"\n }\n}\n" - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/force-resolution/expected-payloads/expected-response-2.json b/cds-regression-test/test/resource-resolution/force-resolution/expected-payloads/expected-response-2.json deleted file mode 100644 index 5d52426..0000000 --- a/cds-regression-test/test/resource-resolution/force-resolution/expected-payloads/expected-response-2.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "correlationUUID": null, - "commonHeader": { - "timestamp": "2020-05-07T22:18:06.901Z", - "originatorId": "System", - "requestId": "1234", - "subRequestId": "1234-12234", - "flags": null - }, - "actionIdentifiers": { - "blueprintName": "RT-resource-resolution", - "blueprintVersion": "1.0.0", - "actionName": "resource-resolution", - "mode": "sync" - }, - "status": { - "code": 200, - "eventType": "EVENT_COMPONENT_EXECUTED", - "timestamp": "2020-05-07T22:18:22.289Z", - "errorMessage": null, - "message": "success" - }, - "payload": { - "resource-resolution-response": { - "meshed-template": { - "helloworld-velocity": "{\n \"default\": \"ok\",\n \"input\": \"ok-ok\",\n \"script\": {\n \"python\": \"ok\",\n \"kotlin\": \"ok\"\n },\n \"db\": \"ok\",\n \"rest\": {\n \"GET\": \"get:ok\",\n \"POST\": \"post:ok\",\n \"PUT\": \"put:ok\",\n \"PATCH\": \"patch:ok\",\n \"DELETE\": \"delete:ok\"\n }\n}\n", - "helloworld-jinja": "{\n \"default\": \"ok\",\n \"input\": \"ok-ok\",\n \"script\": {\n \"python\": \"ok\",\n \"kotlin\": {\n \"base\": \"ok\"\n \"from suspend function\": \"ok\"\n }\n },\n \"db\": \"ok\",\n \"rest\": {\n \"GET\": \"get:ok\",\n \"POST\": \"post:ok\",\n \"PUT\": \"put:ok\",\n \"PATCH\": \"patch:ok\",\n \"DELETE\": \"delete:ok\"\n }\n}\n" - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/force-resolution/request-payloads/request-payload-1.json b/cds-regression-test/test/resource-resolution/force-resolution/request-payloads/request-payload-1.json deleted file mode 100644 index 91e4612..0000000 --- a/cds-regression-test/test/resource-resolution/force-resolution/request-payloads/request-payload-1.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "commonHeader": { - "originatorId": "System", - "requestId": "1234", - "subRequestId": "1234-12234" - }, - "actionIdentifiers": { - "blueprintName": "RT-resource-resolution", - "blueprintVersion": "1.0.0", - "actionName": "resource-resolution", - "mode": "sync" - }, - "payload": { - "resource-resolution-request": { - "template-prefix": [ - "helloworld-velocity", - "helloworld-jinja" - ], - "resolution-key": "regression-test", - "resource-resolution-properties": { - "v_input": "ok", - "j_input": "ok" - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/force-resolution/request-payloads/request-payload-2.json b/cds-regression-test/test/resource-resolution/force-resolution/request-payloads/request-payload-2.json deleted file mode 100644 index de8a797..0000000 --- a/cds-regression-test/test/resource-resolution/force-resolution/request-payloads/request-payload-2.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "commonHeader": { - "originatorId": "System", - "requestId": "1234", - "subRequestId": "1234-12234" - }, - "actionIdentifiers": { - "blueprintName": "RT-resource-resolution", - "blueprintVersion": "1.0.0", - "actionName": "resource-resolution", - "mode": "sync" - }, - "payload": { - "resource-resolution-request": { - "template-prefix": [ - "helloworld-velocity", - "helloworld-jinja" - ], - "resolution-key": "regression-test", - "resource-resolution-properties": { - "v_input": "ok-ok", - "j_input": "ok-ok" - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/force-resolution/test.sh b/cds-regression-test/test/resource-resolution/force-resolution/test.sh deleted file mode 100644 index 013df7e..0000000 --- a/cds-regression-test/test/resource-resolution/force-resolution/test.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -CBA_NAME="resource-resolution" -TEST_NAME="force-resolution" -TEST_NUMBER=$RANDOM - -REQUEST_PAYLOAD_DIR="request-payloads" -EXPECTED_PAYLOAD_DIR="expected-payloads" - -mkdir -p "$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/" -RESPONSE_HEADERS_FILE_1="$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/response-headers-1" -RESPONSE_PAYLOAD_FILE_1="$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/response-payload-1" -REQUEST_PAYLOAD_FILE_1="$TEST_DIRECTORY/$CBA_NAME/$TEST_NAME/$REQUEST_PAYLOAD_DIR/request-payload-1.json" -EXPECTED_PAYLOAD_FILE_1="$TEST_DIRECTORY/$CBA_NAME/$TEST_NAME/$EXPECTED_PAYLOAD_DIR/expected-response-1.json" - -RESPONSE_HEADERS_FILE_2="$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/response-headers-2" -RESPONSE_PAYLOAD_FILE_2="$RESPONSES_DIRECTORY/$CBA_NAME/$TEST_NAME/$TEST_NUMBER/response-payload-2" -REQUEST_PAYLOAD_FILE_2="$TEST_DIRECTORY/$CBA_NAME/$TEST_NAME/$REQUEST_PAYLOAD_DIR/request-payload-2.json" -EXPECTED_PAYLOAD_FILE_2="$TEST_DIRECTORY/$CBA_NAME/$TEST_NAME/$EXPECTED_PAYLOAD_DIR/expected-response-2.json" - -. ./$TEST_DIRECTORY/utils.sh - -echo "Running test: $CBA_NAME:$TEST_NUMBER:$TEST_NAME" -echo "Running initial ressource-resolution to resolve template..." -process_cba $REQUEST_PAYLOAD_FILE_1 $RESPONSE_PAYLOAD_FILE_1 $RESPONSE_HEADERS_FILE_1 - -echo 'Assert statuscode' -assert_status_code 200 $RESPONSE_HEADERS_FILE_1 - -echo 'Assert payload' -assert_cds_response_equals $EXPECTED_PAYLOAD_FILE_1 $RESPONSE_PAYLOAD_FILE_1 - - -# Verify force-resolution -## Same resolution-key, different input values from above test. -## Force-resolution is enabled in the CBA so we shouldn't get the same resolved template as above. -echo "Running the same ressource-resolution but with different inputs..." -process_cba $REQUEST_PAYLOAD_FILE_2 $RESPONSE_PAYLOAD_FILE_2 $RESPONSE_HEADERS_FILE_2 - -echo 'Assert statuscode' -assert_status_code 200 $RESPONSE_HEADERS_FILE_2 - -echo 'Assert payload' -assert_cds_response_equals $EXPECTED_PAYLOAD_FILE_2 $RESPONSE_PAYLOAD_FILE_2 diff --git a/cds-regression-test/test/resource-resolution/init-mockserver.sh b/cds-regression-test/test/resource-resolution/init-mockserver.sh deleted file mode 100755 index 005ed2f..0000000 --- a/cds-regression-test/test/resource-resolution/init-mockserver.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{ - "httpRequest" : { - "method" : "GET", - "path" : "/get" - }, - "httpResponse" : { - "body" : "{\"value\": \"get:ok\"}" - } -}' - -curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{ - "httpRequest" : { - "method" : "POST", - "path" : "/post" - }, - "httpResponse" : { - "body" : "{\"value\": \"post:ok\"}" - } -}' - -curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{ - "httpRequest" : { - "method" : "PUT", - "path" : "/put" - }, - "httpResponse" : { - "body" : "{\"value\": \"put:ok\"}" - } -}' - -curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{ - "httpRequest" : { - "method" : "PATCH", - "path" : "/patch" - }, - "httpResponse" : { - "body" : "{\"value\": \"patch:ok\"}" - } -}' - -curl -v -X PUT "http://$MOCKSERVER_URL:$MOCKSERVER_PORT/mockserver/expectation" -d '{ - "httpRequest" : { - "method" : "DELETE", - "path" : "/delete" - }, - "httpResponse" : { - "body" : "{\"value\": \"delete:ok\"}" - } -}' diff --git a/cds-regression-test/test/resource-resolution/resource-resolution-enrichment-test.sh b/cds-regression-test/test/resource-resolution/resource-resolution-enrichment-test.sh deleted file mode 100755 index 79236ae..0000000 --- a/cds-regression-test/test/resource-resolution/resource-resolution-enrichment-test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -CBA_NAME="resource-resolution" -TEST_NAME="$CBA_NAME-enrichment" -TEST_NUMBER=$RANDOM -RESPONSE_HEADERS_FILE="$RESPONSES_DIRECTORY/$TEST_NAME-$TEST_NUMBER-response-headers" - -. ./$TEST_DIRECTORY/utils.sh - -echo "Compressing CBA: $CBA_NAME" -compress_cba $CBA_NAME - -echo "Enriching CBA: $CBA_NAME" -enrich_cba $CBA_NAME $RESPONSE_HEADERS_FILE - -echo 'Assert status 200' -assert_status_code 200 $RESPONSE_HEADERS_FILE diff --git a/cds-regression-test/test/resource-resolution/resource-resolution-upload-dd.sh b/cds-regression-test/test/resource-resolution/resource-resolution-upload-dd.sh deleted file mode 100755 index 96f1007..0000000 --- a/cds-regression-test/test/resource-resolution/resource-resolution-upload-dd.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -TEST_NAME="upload-data-dict" -TEST_NUMBER=$RANDOM -REQUEST_DD_PAYLOAD_DIR="$TEST_DIRECTORY/resource-resolution/data-dict" - -. ./$TEST_DIRECTORY/utils.sh - -# delete useless log file -rm $FAILED_TESTS_LOG - -DD_PAYLOADS=$(ls $REQUEST_DD_PAYLOAD_DIR) -for DD_PAYLOAD in $DD_PAYLOADS -do - echo "Uploading DD : $DD_PAYLOAD" - PAYLOAD_NAME=$(echo "$DD_PAYLOAD" | cut -d '.' -f1) - RESPONSE_HEADERS_FILE="$RESPONSES_DIRECTORY/$TEST_NAME-$PAYLOAD_NAME-$TEST_NUMBER-response-headers" - RESPONSE_PAYLOAD_FILE="$RESPONSES_DIRECTORY/$TEST_NAME-$PAYLOAD_NAME-$TEST_NUMBER-response-payload" - PAYLOAD_FILE="$REQUEST_DD_PAYLOAD_DIR/$DD_PAYLOAD" - FAILED_TESTS_LOG="$FAILED_TESTS_DIRECTORY/$TEST_NAME-$PAYLOAD_NAME-$TEST_NUMBER.log" - - # create log life - touch $FAILED_TESTS_LOG - - upload_dd $PAYLOAD_FILE $RESPONSE_PAYLOAD_FILE $RESPONSE_HEADERS_FILE - - echo 'Assert status 200' - assert_status_code 200 $RESPONSE_HEADERS_FILE -done diff --git a/cds-regression-test/test/resource-resolution/resource-resolution-upload-test.sh b/cds-regression-test/test/resource-resolution/resource-resolution-upload-test.sh deleted file mode 100755 index 16c7326..0000000 --- a/cds-regression-test/test/resource-resolution/resource-resolution-upload-test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -CBA_NAME="resource-resolution" -TEST_NAME="$CBA_NAME-upload" -TEST_NUMBER=$RANDOM -RESPONSE_HEADERS_FILE="$RESPONSES_DIRECTORY/$TEST_NAME-$TEST_NUMBER-response-headers" -RESPONSE_PAYLOAD_FILE="$RESPONSES_DIRECTORY/$TEST_NAME-$TEST_NUMBER-response-payload" -REQUEST_PAYLOAD_FILE="$TEST_DIRECTORY/$CBA_NAME/dummy-request-payload.json" - -. ./$TEST_DIRECTORY/utils.sh - -echo "Uploading CBA: $CBA_NAME" -upload_cba $CBA_NAME $RESPONSE_PAYLOAD_FILE $RESPONSE_HEADERS_FILE - -echo 'Assert status 200' -assert_status_code 200 $RESPONSE_HEADERS_FILE - -# This step prevents a race-condition for parallel process requests -# when cba has not yet been written to filesystem -echo 'Send process request to force CDS to load CBA to filesystem' -process_cba $REQUEST_PAYLOAD_FILE '/dev/null' '/dev/null' diff --git a/cds-regression-test/test/resource-resolution/success/expected-payloads/expected-response.json b/cds-regression-test/test/resource-resolution/success/expected-payloads/expected-response.json deleted file mode 100644 index efb6282..0000000 --- a/cds-regression-test/test/resource-resolution/success/expected-payloads/expected-response.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "correlationUUID": null, - "commonHeader": { - "timestamp": "2020-05-07T22:18:06.901Z", - "originatorId": "System", - "requestId": "1234", - "subRequestId": "1234-12234", - "flags": null - }, - "actionIdentifiers": { - "blueprintName": "RT-resource-resolution", - "blueprintVersion": "1.0.0", - "actionName": "resource-resolution", - "mode": "sync" - }, - "status": { - "code": 200, - "eventType": "EVENT_COMPONENT_EXECUTED", - "timestamp": "2020-05-07T22:18:22.289Z", - "errorMessage": null, - "message": "success" - }, - "payload": { - "resource-resolution-response": { - "meshed-template": { - "helloworld-velocity": "{\n \"default\": \"ok\",\n \"input\": \"ok\",\n \"script\": {\n \"python\": \"ok\",\n \"kotlin\": \"ok\"\n },\n \"db\": \"ok\",\n \"rest\": {\n \"GET\": \"get:ok\",\n \"POST\": \"post:ok\",\n \"PUT\": \"put:ok\",\n \"PATCH\": \"patch:ok\",\n \"DELETE\": \"delete:ok\"\n }\n}\n", - "helloworld-jinja": "{\n \"default\": \"ok\",\n \"input\": \"ok\",\n \"script\": {\n \"python\": \"ok\",\n \"kotlin\": {\n \"base\": \"ok\"\n \"from suspend function\": \"ok\"\n }\n },\n \"db\": \"ok\",\n \"rest\": {\n \"GET\": \"get:ok\",\n \"POST\": \"post:ok\",\n \"PUT\": \"put:ok\",\n \"PATCH\": \"patch:ok\",\n \"DELETE\": \"delete:ok\"\n }\n}\n" - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/success/request-payloads/request-payload.json b/cds-regression-test/test/resource-resolution/success/request-payloads/request-payload.json deleted file mode 100644 index 91e4612..0000000 --- a/cds-regression-test/test/resource-resolution/success/request-payloads/request-payload.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "commonHeader": { - "originatorId": "System", - "requestId": "1234", - "subRequestId": "1234-12234" - }, - "actionIdentifiers": { - "blueprintName": "RT-resource-resolution", - "blueprintVersion": "1.0.0", - "actionName": "resource-resolution", - "mode": "sync" - }, - "payload": { - "resource-resolution-request": { - "template-prefix": [ - "helloworld-velocity", - "helloworld-jinja" - ], - "resolution-key": "regression-test", - "resource-resolution-properties": { - "v_input": "ok", - "j_input": "ok" - } - } - } -} diff --git a/cds-regression-test/test/resource-resolution/success/test.sh b/cds-regression-test/test/resource-resolution/success/test.sh deleted file mode 100755 index c43c276..0000000 --- a/cds-regression-test/test/resource-resolution/success/test.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -CBA_NAME="resource-resolution" -TEST_NAME="success" -TEST_NUMBER=$RANDOM - -REQUEST_PAYLOAD_DIR="request-payloads" -EXPECTED_PAYLOAD_DIR="expected-payloads" - -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_DIR/request-payload.json" -EXPECTED_PAYLOAD_FILE="$TEST_DIRECTORY/$CBA_NAME/$TEST_NAME/$EXPECTED_PAYLOAD_DIR/expected-response.json" - -. ./$TEST_DIRECTORY/utils.sh - -echo "Running test: $CBA_NAME:$TEST_NUMBER:$TEST_NAME" -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 |