Skip to content

Add test coverage for the test/install ON_ERROR_STOP rule - #86

Open
jnasbyupgrade wants to merge 3 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:fix-error-stop-order-check
Open

jnasbyupgrade wants to merge 3 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:fix-error-stop-order-check

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Paired with Postgres-Extensions/pgxntool#122, which changes check-test-install-error-stop.sh to this rule: a test/install/*.sql file passes iff it explicitly enables ON_ERROR_STOP (any later disable is then fine), or includes test/pgxntool/psql.sql and never disables it (\set ON_ERROR_STOP off or \unset ON_ERROR_STOP).

test/standard/check-test-install-error-stop-script.bats covers each branch of the rule:

  • explicit on, then off: passes
  • psql.sql only: passes
  • psql.sql plus \set ON_ERROR_STOP off: fails
  • psql.sql plus \unset ON_ERROR_STOP: fails
  • off only: fails
  • no mention at all: fails

Test plan

  • test/standard/check-test-install-error-stop-script.bats: 10/10 passed (8 existing + 2 new).
  • Full suite on the merged heads (pgxntool 4f3b50d, pgxntool-test 977c37f): 269/269 passed, 0 skipped (local run, log test-full-20261004T152700.log).

🤖 Generated with Claude Code

Add tests/updates for pgxntool commit
Postgres-Extensions/pgxntool#122 (order-sensitive
ON_ERROR_STOP detection in check-test-install-error-stop.sh):
- Bare substring grep passed a file that only ever turned ON_ERROR_STOP
  off; the script now requires an explicit on-value seen in file order.

Extend the existing script-logic bats file with the two new cases that
distinguish this from the old bare-substring behavior:
- on-then-off still passes (a later off doesn't undo an earlier on)
- off-only (never explicitly on) fails

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 16, 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: Advanced
  • Run ID: b3367963-48cc-426b-abec-669ac7ba8c44

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 and others added 2 commits October 4, 2026 14:54
Add tests/updates for pgxntool commit ff766b3
(Postgres-Extensions/pgxntool#122): an explicit
`\set ON_ERROR_STOP on` excuses a later turn-off, but including psql.sql
does not.

- psql.sql plus `\set ON_ERROR_STOP off` fails
- psql.sql plus `\unset ON_ERROR_STOP` fails

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jnasbyupgrade jnasbyupgrade changed the title Add test coverage for order-sensitive ON_ERROR_STOP check Add test coverage for the test/install ON_ERROR_STOP rule Oct 4, 2026
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