fit: complete lab4, fix P1.1-P1.3, add Track 1 presigned
This commit is contained in:
@@ -43,7 +43,8 @@ expect_code 201
|
||||
ID1=$(printf '%s' "$HTTP_BODY" | jq -r .id)
|
||||
http_json POST "/api/v1/direct-uploads/$ID1/complete" \
|
||||
-H "Authorization: Bearer $ALICE_TOKEN"
|
||||
expect_code 400
|
||||
expect_code 409
|
||||
assert_eq "$(printf '%s' "$HTTP_BODY" | jq -r .error.code)" not_ready
|
||||
|
||||
# --- abort ---
|
||||
http_json POST "/api/v1/chats/$CHAT_ID/direct-uploads" \
|
||||
@@ -91,7 +92,8 @@ put_code=$(put_via_net "$URL4" "$CT4" "$png")
|
||||
[ "$put_code" = "200" ] || die "PUT checksum-case got $put_code"
|
||||
http_json POST "/api/v1/direct-uploads/$ID4/complete" \
|
||||
-H "Authorization: Bearer $ALICE_TOKEN"
|
||||
expect_code 400
|
||||
expect_code 409
|
||||
assert_eq "$(printf '%s' "$HTTP_BODY" | jq -r .error.code)" hash_mismatch
|
||||
|
||||
# Proxy path still works
|
||||
upload_file "$CHAT_ID" "$png" "proxy.png" "image/png"
|
||||
|
||||
Reference in New Issue
Block a user