mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 23:53:45 +00:00
test(server): fix and wire up the two unrun Python suites
test_contracts.py required operation ID `recordPlayerConnected`, but
openapi.json names that endpoint `claimPlayerConnection` — the accurate
name, since POST /servers/{id}/connect claims a connection lease and
returns a generation. Align the test on the document and assert the set
difference, so a future mismatch names the missing operation instead of
reporting "False is not true".
test_observability_manifests.py copied only two of the four files the
checker reads, so it died on a missing kustomization.yaml before ever
reaching the mutated namespace. Copy the full fixture, split the
namespace and scrape-path mutations into separate cases so either
defect produces its own diagnostic, and add an unmutated-copy case so a
broken fixture can't make the mutation cases pass vacuously.
Neither suite was invoked by any Make target or workflow, which is why
both could sit red. Add them, plus test_threat_model.py, to
verify_multiplayer_local.sh.
This commit is contained in:
@@ -50,12 +50,21 @@ run_godot_harness
|
||||
|
||||
echo "local multiplayer gate: contracts and manifests"
|
||||
python3 -m json.tool "$root_dir/server/contracts/v1/openapi.json" >/dev/null
|
||||
# json.tool only proves the contract parses. test_contracts.py is what actually
|
||||
# checks the operation IDs, envelopes and state vocabulary generated clients
|
||||
# bind to; it was previously not run by any target, so a real mismatch between
|
||||
# openapi.json and the suite sat undetected.
|
||||
python3 "$root_dir/server/contracts/v1/test_contracts.py"
|
||||
python3 "$root_dir/server/migrations/test_migration.py"
|
||||
python3 "$root_dir/server/security/test_fleet_manifests.py"
|
||||
python3 "$root_dir/server/security/test_compose_manifests.py"
|
||||
python3 "$root_dir/server/security/test_kubernetes_policies.py"
|
||||
python3 "$root_dir/server/security/test_supply_chain.py"
|
||||
python3 "$root_dir/server/security/test_threat_model.py"
|
||||
python3 "$root_dir/scripts/verify_observability_manifests.py"
|
||||
# The checker above validates the checked-in manifests; this validates the
|
||||
# checker itself still rejects a widened scrape scope.
|
||||
python3 "$root_dir/server/security/test_observability_manifests.py"
|
||||
python3 -m unittest "$root_dir/scripts/test_verify_agones_allocation_response.py"
|
||||
|
||||
echo "LOCAL MULTIPLAYER GATE PASS"
|
||||
|
||||
Reference in New Issue
Block a user