Bug fixing
This commit is contained in:
13
test.sh
13
test.sh
@@ -211,6 +211,13 @@ UPLOAD_RESPONSE=$(curl -X PUT \
|
||||
|
||||
FIRST_HASH=$(echo ${UPLOAD_RESPONSE} | jq -r '.hash')
|
||||
|
||||
# Store first version's metadata before uploading second version
|
||||
FIRST_METADATA=$(curl -s "${BASE_URL}/meta/${BASE_TAG}:latest")
|
||||
echo "First version metadata response: ${FIRST_METADATA}"
|
||||
if ! echo "${FIRST_METADATA}" | jq -r '.metadata.tags[]' | grep -q 'v1'; then
|
||||
die "First version does not have v1 tag"
|
||||
fi
|
||||
|
||||
# Upload second version with same tag 'latest'
|
||||
SECOND_METADATA_JSON=$(cat <<EOF
|
||||
{
|
||||
@@ -221,10 +228,14 @@ SECOND_METADATA_JSON=$(cat <<EOF
|
||||
EOF
|
||||
)
|
||||
|
||||
if [ ! -f "${SCRIPT_DIR}/test_1GB_file_upload.sh" ]; then
|
||||
die "test_1GB_file_upload.sh not found"
|
||||
fi
|
||||
|
||||
echo "uploading second version with tag 'latest'"
|
||||
UPLOAD_RESPONSE=$(curl -X PUT \
|
||||
-H "Authorization: Bearer ${WRITE_TOKEN}" \
|
||||
-F "file=@${SCRIPT_DIR}/${SCRIPT_NAME}" \
|
||||
-F "file=@${SCRIPT_DIR}/test_1GB_file_upload.sh" \
|
||||
-F "metadata=${SECOND_METADATA_JSON}" \
|
||||
"http://localhost:8123/upload")
|
||||
|
||||
|
Reference in New Issue
Block a user