mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
feat(multiplayer): wire ranked profile runtime policy
This commit is contained in:
@@ -29,6 +29,7 @@ pg_port="55434"
|
||||
api_port="18099"
|
||||
logs_dir="$(mktemp -d "${TMPDIR:-/tmp}/cosmic-clash-control-plane.XXXXXX")"
|
||||
assignment_smoke="${ASSIGNMENT_SMOKE:-0}"
|
||||
ranked_smoke="${RANKED_SMOKE:-0}"
|
||||
|
||||
testkit_pid=""
|
||||
cleanup() {
|
||||
@@ -116,6 +117,15 @@ INSERT INTO assignments (match_id, player_id, allocation_id, server_id, slot, re
|
||||
VALUES ('assignment-smoke-match', '$assignment_player_id', 'assignment-smoke-allocation', 'assignment-smoke-server', 0, 'EU', 'smoke-build', 1, 'enet', '127.0.0.1:30001', 'assignment-smoke-join-authorisation', decode('000102030405060708090a0b0c0d0e0f', 'hex'), now() + interval '1 hour', 1)
|
||||
ON CONFLICT (match_id, player_id) DO NOTHING;"
|
||||
godot_args+=(--assignment-match-id="assignment-smoke-match" --steam-ticket="$assignment_ticket")
|
||||
elif [ "$ranked_smoke" = "1" ]; then
|
||||
ranked_ticket="ranked-profile-smoke-web-api-ticket"
|
||||
ranked_player_id="testkit-$(printf '%s' "$ranked_ticket" | shasum -a 256 | awk '{print substr($1,1,16)}')"
|
||||
docker exec "$container_name" psql -v ON_ERROR_STOP=1 -U "$user" -d "$database" -c "
|
||||
INSERT INTO identities (player_id, steam_id) VALUES ('$ranked_player_id', 'ranked-profile-smoke-steam') ON CONFLICT (player_id) DO NOTHING;
|
||||
INSERT INTO ratings (player_id, rating, deviation, volatility, ranked_games, revision)
|
||||
VALUES ('$ranked_player_id', 1600, 120, 0.05, 12, 3)
|
||||
ON CONFLICT (player_id) DO NOTHING;"
|
||||
godot_args+=(--steam-ticket="$ranked_ticket" --ranked-profile-smoke)
|
||||
fi
|
||||
|
||||
"$godot_bin" --headless --path Game res://tests/control_plane_smoke.tscn -- "${godot_args[@]}" \
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Real authenticated ranked-profile response verification. The shared gate
|
||||
# keeps the existing fresh-player 404 path as its default and enables this
|
||||
# populated durable-rating fixture only for this explicit variant.
|
||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$root_dir"
|
||||
RANKED_SMOKE=1 bash scripts/verify_control_plane_integration.sh
|
||||
Reference in New Issue
Block a user