Add test coverage for DATA wildcard fix (issue #48) - #56
Merged
jnasbyupgrade merged 3 commits intoJul 31, 2026
Merged
Conversation
Add tests/updates for pgxntool commit e7539f3 (brief description): - Widen base.mk's DATA wildcard from sql/*--*--*.sql to sql/*--*.sql so historical full-install version scripts (one `--`) get installed, not just upgrade scripts (two `--`) - Wrap in $(sort ...) to dedupe the current-version file, which the wider wildcard now also matches Add "DATA includes historical single-version sql files (issue Postgres-Extensions#48)" to test/standard/base-mk-misc.bats. Runs `make print-DATA` against the template's existing historical version file (sql/pgxntool-test--0.1.0.sql) and asserts it's listed -- no scratch fixture needed since the template already carries this file. Verified the test fails against the old two-`--`-only wildcard and passes with the fix. Co-Authored-By: Claude <noreply@anthropic.com>
3 tasks
|
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 |
jnasbyupgrade
marked this pull request as ready for review
July 30, 2026 22:54
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
jnasbyupgrade
added a commit
to Postgres-Extensions/pgxntool
that referenced
this pull request
Jul 31, 2026
…) (#80) - Closes #48. `base.mk`'s `DATA` wildcard (`sql/*--*--*.sql`) required two `--` separators, so it only matched upgrade scripts (`ext--a--b.sql`). Historical full-install scripts (`ext--a.sql`, one `--`) never matched, even though they're meant to be committed to git for update testing — `make install` silently never placed them, so `CREATE EXTENSION ext VERSION 'x.y.z'` failed for any version older than current. - Widened to `sql/*--*.sql`, which matches both forms. - Added a `README.asc` "Gotchas" section documenting a related-but-distinct issue (#44): `DATA`'s `$(wildcard)` can still miss versioned SQL that's *generated* (not committed) during the same `make` invocation, due to a GNU Make directory-cache quirk. Left #44 itself unfixed — this PR only documents the gotcha and workarounds, cross-referenced on that issue. Paired test PR: Postgres-Extensions/pgxntool-test#56
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.
Summary
DATAwildcard silently skipping historical full-install version scripts likesql/ext--0.9.6.sql).@test "DATA includes historical single-version sql files (issue #48)"intest/standard/base-mk-misc.batsrunsmake print-DATAagainst the template's existing historical version file (sql/pgxntool-test--0.1.0.sql) and asserts it's listed. No scratch fixture needed — the template already carries this file.---only wildcard and passes with the fix.Test plan
test-all): 250/250 passing