Repository navigation
fix(testing): reset Postgres tables with TRUNCATE so row triggers cannot refuse it (#1052) - #1059
Merged
Merged
Conversation
…not refuse it (#1052) Claude-Session: https://claude.ai/code/session_01FXHA3Zj78w6GWaNKoovHq6
…testmark already applies Claude-Session: https://claude.ai/code/session_01FXHA3Zj78w6GWaNKoovHq6
…te-1052 # Conflicts: # CHANGELOG.md
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying simple-module-python with
|
| Latest commit: |
a9be636
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d8a9594.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-test-reset-truncate-1052.simple-module-python.pages.dev |
Owner
Author
|
/ship passed on a9be636
|
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
simple_module_test's between-test reset on Postgres now runs oneTRUNCATE … RESTART IDENTITY RESTRICTover the model tables instead of aDELETEper table. AppBEFORE DELETErow triggers, such as immutable issued records, no longer make every later test error at setup (simple_module_test: between-test table reset uses DELETE, which row triggers can refuse #1052).RESTRICTinstead ofCASCADE: the reset never empties tables outside its list. A foreign key from such a table makes the reset fail loudly.lock_timeoutmakes a connection leaked from the previous test fail setup instead of hanging it.TRUNCATEtriggers still fire; this is documented indocs/testing/fixtures.md.Verification
framework/testing/tests: 97 passed.database.pyreverted, 3 of the reset tests fail.-n 8: 3618 passed.make lint✓,make test-js998 ✓,PYTEST_WORKERS=8 make test-py9521 passed ✓.framework/testing+ mail tests, 189 passed./ship: optimize, then 2 review passes (pass 1 fixed CASCADE scope, the lock hang and the dead code; pass 2 clean on both).Closes #1052
https://claude.ai/code/session_01FXHA3Zj78w6GWaNKoovHq6