70a64e3709
Freeze the running offline FUT backend into version control as fifa17-recon/docker/fifa17-python/ - declarative and rebuildable from a fresh checkout: * OPENFUT_BIND / OPENFUT_ADVERTISE client/server split in the responders (lsx, blaze, roster, utas, pow) + entrypoint.sh; OPENFUT_ADVERTISE is required for remote mode (compose and entrypoint fail without it) * docker-compose.yml reproducing the frozen baseline container exactly (env, ports incl. the 8085->8080 POW-content remap, /state bind, restart) * .env.example / .env for site config - the LAN IP is never hardcoded in source * tools/ + data/ staged from openfut-fut-backend:python-baseline-2026-08-10, verified byte-identical to the running container at freeze time * client_arm.sh (the 105 client-side arming counterpart) * Dockerfile bakes /app/SHA256SUMS.txt so any image is self-identifying * docs/BASELINE-python-2026-08-10.md: frozen image/container/hash record, restore instructions and rebuild-equivalence procedure Secrets (redir key/cert, .env) and runtime state (docker/state) stay gitignored. The live container is untouched pending the .105 launcher audit.
38 lines
1.3 KiB
Python
38 lines
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""Regression for the FIFA 17 tournament-list response wrapper.
|
|
|
|
CardsDLL's endpoint response parser at 0x18016b220 accepts an OBJECT root,
|
|
recognizes only tournament (atom 0x328), then opens its ARRAY and invokes the
|
|
element parser at 0x180169ef0. A bare array therefore parses as no tournament
|
|
list at all.
|
|
"""
|
|
import os
|
|
import pathlib
|
|
import sys
|
|
import tempfile
|
|
|
|
TOOLS = pathlib.Path(__file__).resolve().parent
|
|
sys.path.insert(0, str(TOOLS))
|
|
|
|
|
|
def main():
|
|
with tempfile.TemporaryDirectory(prefix="openfut-tournament-test-") as state:
|
|
os.environ["FUT_PROFILE_ROOT"] = os.path.join(state, "accounts")
|
|
os.environ.pop("FUT_PROFILE", None)
|
|
|
|
import utas_server
|
|
|
|
body = utas_server.tournament_list()
|
|
assert isinstance(body, dict), "tournament response root must be an object"
|
|
body_dict = dict(body)
|
|
assert set(body_dict) == {"tournament"}, repr(body_dict)
|
|
tournaments = body_dict["tournament"]
|
|
assert isinstance(tournaments, list), "tournament must be an array"
|
|
assert tournaments, "the offline tournament catalog must not be empty"
|
|
assert all(isinstance(entry, dict) for entry in tournaments)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
print("PASS: tournament response uses the recovered object/array wrapper")
|