Repository navigation
test: pin default-only schema resources in a multi-connection context - #584
RiccardoBifulco wants to merge 1 commit into
Conversation
yeongseon
left a comment
There was a problem hiding this comment.
Reviewed HEAD 808e77b for #582. This is a test-only regression that correctly builds a multi-connection AppContext with distinguishable default and reporting schemas; it asserts both cubrid://schema and the table resource remain on default, while the describe_table(connection='reporting') tool consults only the named database. The fake database call counts and differing columns make cross-connection routing mistakes observable without network or credentials. No production contract or docs are changed. Code approved, subject to first-time contributor Actions approval and a successful final-head CI run (currently action_required). The reported pre-existing test_makefile.py failure must also be independently assessed if it persists in CI.
Fixes #582
Adds an offline regression test in
tests/test_server.pyusing one multi-connectionAppContext(default +reportingfake databases, same table name with distinguishable columns):cubrid://schemaandcubrid://schema/{table}return data only from the default database, and the reporting database receives no calls from them.describe_table(connection="reporting")uses the reporting database and never the default one.Verified the test fails if the table resource is routed to
reporting. No source, docs or URI contract changes; no network, Docker or secrets needed.Local results:
python -m pytest tests/test_server.py -q: 167 passedmake check(ruff, format, mypy): passmake test: 1925 passed, coverage 99.15%, 1 failure intests/test_makefile.py::test_verify_execs_the_runner_and_a_dry_run_writes_nothing, which also fails on unmodifiedmain(unrelated).