diff options
Diffstat (limited to 'cds-regression-test/test/resource-resolution/resource-resolution-upload-dd.sh')
-rwxr-xr-x | cds-regression-test/test/resource-resolution/resource-resolution-upload-dd.sh | 29 |
1 files changed, 29 insertions, 0 deletions
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 new file mode 100755 index 0000000..96f1007 --- /dev/null +++ b/cds-regression-test/test/resource-resolution/resource-resolution-upload-dd.sh @@ -0,0 +1,29 @@ +#!/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 |