Repository navigation
test(shop): add a pilotage schema integrity e2e (idempotence, unique keys, restore) - #48
Merged
Merged
Conversation
…keys, restore) Third lot of issue #3 (test-secure the dashboard). Adds an integration e2e — `make e2e-pilotage-schema-local`, auto-discovered by scripts/e2e-ci.sh so it also runs in CI — that verifies, against the real PilotageSchemaManager: - migration idempotence (re-run without SQL error, all six tables present); - the sequence_number nullability fix (the documented dbDelta pitfall); - that the unique constraints (receipts.sequence_number, harvest_lots.code, stock_movements.reference_key) reject duplicates (a concurrency proxy); - a backup/restore round-trip. Every check runs on `CREATE TEMPORARY TABLE … LIKE` copies, so no real data is touched, and the temp tables are dropped at the end. AGENTS documents it next to the dbDelta pitfall. Gates green: CS-Fixer, PHPStan (max), PHPUnit (346), new e2e (16 assertions).
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.
Third lot of #3 (test-secure the dashboard).
Adds an integration e2e —
make e2e-pilotage-schema-local, auto-discovered byscripts/e2e-ci.shso it runs in CI too — verifying, against the realPilotageSchemaManager:sequence_numbernullability fix (the documented dbDelta pitfall);receipts.sequence_number,harvest_lots.code,stock_movements.reference_key) reject duplicates — a concurrency proxy;Every check runs on
CREATE TEMPORARY TABLE … LIKEcopies, so no real data is touched and the temporary tables are dropped at the end.Gates green: PHP-CS-Fixer, PHPStan (max), PHPUnit (346), new e2e (16 assertions).
Relates to #3