Skip to content

Add test coverage for DATA wildcard fix (issue #48) - #56

Merged
jnasbyupgrade merged 3 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-48-data-wildcard
Jul 31, 2026
Merged

Add test coverage for DATA wildcard fix (issue #48)#56
jnasbyupgrade merged 3 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-48-data-wildcard

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Summary

  • Adds regression coverage for Fix DATA wildcard skipping historical full-install version scripts (#48) pgxntool#80, which fixes pgxntool#48 (DATA wildcard silently skipping historical full-install version scripts like sql/ext--0.9.6.sql).
  • New @test "DATA includes historical single-version sql files (issue #48)" in 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 — the template already carries this file.
  • Verified the test fails against the old two----only wildcard and passes with the fix.

Test plan

  • Full suite (test-all): 250/250 passing

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>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: becd2763-6d24-4976-b8b0-dfcbb77ad8a3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jnasbyupgrade
jnasbyupgrade marked this pull request as ready for review July 30, 2026 22:54
@github-actions

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@jnasbyupgrade
jnasbyupgrade merged commit 90b2ff4 into Postgres-Extensions:master Jul 31, 2026
10 checks passed
@jnasbyupgrade
jnasbyupgrade deleted the issue-48-data-wildcard branch July 31, 2026 22:08
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
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.

1 participant