Skip to content

test: pin default-only schema resources in a multi-connection context - #584

Open
RiccardoBifulco wants to merge 1 commit into
cubrid-lab:mainfrom
RiccardoBifulco:test/582-default-only-schema-resources
Open

RiccardoBifulco wants to merge 1 commit into
cubrid-lab:mainfrom
RiccardoBifulco:test/582-default-only-schema-resources

Conversation

@RiccardoBifulco

Copy link
Copy Markdown

Fixes #582

Adds an offline regression test in tests/test_server.py using one multi-connection AppContext (default + reporting fake databases, same table name with distinguishable columns):

  • cubrid://schema and cubrid://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 passed
  • make check (ruff, format, mypy): pass
  • make test: 1925 passed, coverage 99.15%, 1 failure in tests/test_makefile.py::test_verify_execs_the_runner_and_a_dry_run_writes_nothing, which also fails on unmodified main (unrelated).

Copilot AI balanced review requested due to automatic review settings November 20, 2026 13:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@yeongseon yeongseon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: pin default-only schema resources in a multi-connection context

3 participants