Phase 2: TEST_SCHEMA switching in test/install + schema-invariant assertions - #28
Open
jnasbyupgrade wants to merge 1 commit into
Open
Phase 2: TEST_SCHEMA switching in test/install + schema-invariant assertions#28jnasbyupgrade wants to merge 1 commit into
jnasbyupgrade wants to merge 1 commit into
Conversation
…ertions
test/install/load.sql now reads the count_nulls.test_schema GUC (set via
the Makefile's TEST_SCHEMA var, same PGOPTIONS-propagation mechanism as
before) to decide whether to CREATE SCHEMA/SET search_path before
installing - empty means no targeting at all, non-empty explicitly targets
that schema, matching TEST_SCHEMA=Quoted locally.
The harder part: test/core/functions.sql's pgTAP assertions build the SQL
they execute via %I-qualification through ncs() (always correct regardless
of where count_nulls actually landed), but now pass an EXPLICIT, schema-free
description to every call, overriding pgTAP's own auto-generated
descriptions (which embed the schema). This keeps
test/expected/extension_tests.out a single file both the empty and Quoted
TEST_SCHEMA legs pass against, instead of needing one file per schema
value - confirmed by diffing a real Quoted run against the empty-schema
baseline: identical except one line.
That one line is a genuine, unavoidable exception, not an artifact:
test__shutdown__drop_all drops the schema TEST_SCHEMA created, which is
real, different, correct behavior between "there's a schema to clean up"
and "there isn't" (nothing to drop when TEST_SCHEMA is empty). Handled via
pg_regress's native numbered-alternate mechanism -
test/expected/extension_tests_1.out, captured from a real
TEST_SCHEMA=Quoted run - documented in test/README.md's scenario writeup.
Crossed the `test` CI job with TEST_SCHEMA={"", Quoted}.
Verified: make verify-results passes for both the default and
TEST_SCHEMA=Quoted legs against PG17.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #27 (phase 1: test/install adoption). Adds the schema-targeting axis that #27 deliberately deferred.
What changed
Why this matters for what's next
This is the piece that makes crossing update/upgrade testing WITH schema scenarios (a later phase) free - no additional expected-output files needed there either, since the invariance holds regardless of how count_nulls got installed, not just for a fresh install.
Verification
`make verify-results` passes for both the default and `TEST_SCHEMA=Quoted` legs against this container's live PG17.