'Generic Commit'
This commit is contained in:
@@ -481,12 +481,18 @@ if echo "${RESPONSE}" | jq -r '.error' | grep -q "Too many authentication attemp
|
|||||||
die "Expected no rate limit error, got: ${RESPONSE}"
|
die "Expected no rate limit error, got: ${RESPONSE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# delete the object
|
curl -s "${HOSTURL}/meta/${HASH}" | jq
|
||||||
TODELHASH=$(curl -s "${HOSTURL}/hash/test:latest" | jq -r '.hash')
|
|
||||||
echo "deleting test:latest ${TODELHASH}"
|
|
||||||
|
|
||||||
if ! curl -s -H "Authorization: Bearer ${WRITE_TOKEN}" "${HOSTURL}/deleteobject?hash=${TODELHASH}" | jq -r '.result' | grep -q 'success'; then
|
# delete the object (only if it exists)
|
||||||
die "failed to delete ${TODELHASH}"
|
TODELHASH=$(curl -s "${HOSTURL}/hash/test:form_updated" | jq -r '.hash')
|
||||||
|
if [ "${TODELHASH}" != "null" ] && [ -n "${TODELHASH}" ]; then
|
||||||
|
echo "deleting test:form_updated ${TODELHASH}"
|
||||||
|
if ! curl -s -H "Authorization: Bearer ${WRITE_TOKEN}" "${HOSTURL}/deleteobject?hash=${TODELHASH}" | jq -r '.result' | grep -q 'success'; then
|
||||||
|
die "failed to delete ${TODELHASH}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "test:form_updated not found, skipping deletion"
|
||||||
|
echo "HASH=${HASH}, TODELHASH=${TODELHASH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user