Release ObjectStore 0.1.0

This commit is contained in:
admin committed 2026-10-25 07:42:20 +01:00
1 parent 0cf5c11202
commit 35bd1d5703
34 files changed
+1273 -87

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ for setting in request response; do
[ "${#value}" -le 5 ] || { echo "$setting timeout exceeds one day" >&2; exit 1; }
if [ "$value" -gt 0 ]; then
[ "$value" -le 86400 ] || { echo "$setting timeout exceeds one day" >&2; exit 1; }
set -- "$@" "-Dsun.net.httpserver.$property=$((value * 1000))"
set -- "$@" "-Dsun.net.httpserver.$property=$value"
fi
done
+9
View File
@@ -148,6 +148,15 @@ assert "ListParts" in capabilities["operations"], capabilities
assert capabilities["limits"]["maxObjectBytes"] > 0, capabilities
assert headers.get_content_type() == "application/json", headers
ownership = b"<OwnershipControls><Rule><ObjectOwnership>ObjectWriter</ObjectOwnership></Rule></OwnershipControls>"
status, _, _ = request("PUT", f"/{bucket}?ownershipControls", ownership)
assert status == 200, status
public_access = (b"<PublicAccessBlockConfiguration><BlockPublicAcls>false</BlockPublicAcls>"
b"<IgnorePublicAcls>false</IgnorePublicAcls><BlockPublicPolicy>false</BlockPublicPolicy>"
b"<RestrictPublicBuckets>false</RestrictPublicBuckets></PublicAccessBlockConfiguration>")
status, _, _ = request("PUT", f"/{bucket}?publicAccessBlock", public_access)
assert status == 200, status
key = f"/{bucket}/cluster-test/http.txt"
body = b"HTTP gateway integration test"
status, _, _ = request("PUT", key, body)
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
test_dir=$(mktemp -d)
trap 'rm -rf "$test_dir"' EXIT HUP INT TERM
cat > "$test_dir/java" <<'EOF'
#!/bin/sh
printf '%s\n' "$@" > "$OBJECTSTORE_TEST_ARGS"
EOF
chmod +x "$test_dir/java"
OBJECTSTORE_TEST_ARGS="$test_dir/args" PATH="$test_dir:$PATH" \
OBJECTSTORE_REQUEST_TIMEOUT_SECONDS=300 OBJECTSTORE_RESPONSE_TIMEOUT_SECONDS=45 \
sh scripts/start-server.sh
grep -Fx -- '-Dsun.net.httpserver.maxReqTime=300' "$test_dir/args" >/dev/null
grep -Fx -- '-Dsun.net.httpserver.maxRspTime=45' "$test_dir/args" >/dev/null
if OBJECTSTORE_TEST_ARGS="$test_dir/args" PATH="$test_dir:$PATH" \
OBJECTSTORE_REQUEST_TIMEOUT_SECONDS=86401 sh scripts/start-server.sh 2>/dev/null; then
echo 'Oversized request timeout was accepted' >&2
exit 1
fi
echo 'Server launcher timeout tests passed'
+1
View File
@@ -1,6 +1,7 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
sh scripts/test-start-server.sh
mkdir -p out/classes
javac --release 21 --add-modules jdk.httpserver,java.net.http -cp lib/hash4j-0.30.0.jar -d out/classes \
src/cloud/lunarsky/store/*.java test/cloud/lunarsky/store/*.java