Skip to content

Add tests for pgtle exception handler and empty upgrade files - #5

Merged
jnasbyupgrade merged 3 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:fix-pgtle-exception-handler
Feb 12, 2026
Merged

Add tests for pgtle exception handler and empty upgrade files#5
jnasbyupgrade merged 3 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:fix-pgtle-exception-handler

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Related pgxntool PR: Postgres-Extensions/pgxntool#15

Summary

Tests for pgxntool commit 0a6ae77:

  • Fix exception handler to use no_data_found (P0002)
  • Allow empty upgrade files as no-op upgrades
  • Add ON_ERROR_STOP=1 to run_pgtle_sql()

Test Additions

pgtle-install.bats:

  • Test that no_data_found exception handler catches P0002 correctly
  • Test that empty upgrade files generate valid SQL, install successfully, and upgrade works
  • Add physical extension file cleanup to prevent pg_tle registration conflicts (doc.bats runs make install which creates physical files that pg_tle refuses to register over)

test-pgtle-versions.bats:

  • Run full pgtle-install test suite against each available pg_tle version
  • Add proper cleanup between version tests including physical file removal

🤖 Generated with Claude Code

jnasbyupgrade and others added 3 commits February 2, 2026 18:28
Added requirement for significant, user-visible pgxntool changes to update
HISTORY.asc with entries in the STABLE section at the top of the file.

Changes only in pgxntool-test. No related changes in pgxntool.

Co-Authored-By: Claude <noreply@anthropic.com>
Add tests for pgxntool commit 0a6ae77:
- Fix exception handler to use `no_data_found` (P0002)
- Allow empty upgrade files as no-op upgrades
- Add `ON_ERROR_STOP=1` to `run_pgtle_sql()`

Test additions in `pgtle-install.bats`:
- Test that `no_data_found` exception handler works correctly
- Test that empty upgrade files install and upgrade successfully
- Add physical extension file cleanup to prevent pg_tle registration
  conflicts when doc.bats runs `make install`

Multi-version testing in `test-pgtle-versions.bats`:
- Run full pgtle-install test suite against each available pg_tle version
- Add proper cleanup between version tests

Co-Authored-By: Claude <noreply@anthropic.com>
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