test: end-to-end migrator suite + bump kura to v2.0.2#7
Merged
Conversation
Adds kura_sqlite_migrator_SUITE: full migrate -> verify table -> verify schema_migrations row -> rollback path against an in-memory SQLite DB. Closes the SQLite-side gap where unit tests covered DDL emission but no test exercised the kura_migrator runtime end-to-end. This suite caught two real kura bugs that v2.0.0 / v2.0.1 users would have hit on first migrate: - ensure_schema_migrations emitted Postgres-only DDL (TIMESTAMPTZ, DEFAULT now()). Fixed in kura #116 -> v2.0.1. - Dialect dispatch used erlang:function_exported/3 without code:ensure_loaded/1, so SQLite's column_type/format_default callbacks were silently invisible and the migrator fell back to the PG defaults (BIGSERIAL, etc). Fixed in kura #117 -> v2.0.2. Bumps the kura pin to v2.0.2 so this suite picks up both fixes.
🟠 Code Coverage — 58.9%103 of 175 lines covered. 🟡 ELP Lint — 1 warning2 diagnostics found. See job logs for details. ℹ️ 11 OTP CVEs auto-ignored (already fixed in running version)These CVEs are patched in the installed OTP version but NVD data
|
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
Adds
kura_sqlite_migrator_SUITE— fullmigrate→ verify table → verifyschema_migrationsrow →rollbackpath against an in-memory SQLite DB. Closes the SQLite-side gap where unit tests covered DDL emission but no test exercised thekura_migratorruntime end-to-end.Bumps kura pin to v2.0.2 so this suite picks up the two fixes it surfaced:
ensure_schema_migrationsemitted Postgres-only DDL (TIMESTAMPTZ,DEFAULT now()). Fixed in kura #116 → v2.0.1.erlang:function_exported/3withoutcode:ensure_loaded/1, so SQLite'scolumn_type/format_defaultcallbacks were silently invisible — the migrator fell back to PG defaults (BIGSERIAL, etc.). Fixed in kura #117 → v2.0.2.Without these fixes, no v2.0.0 / v2.0.1 user could actually run migrations against SQLite.
Test plan
rebar3 fmt --checkrebar3 xref~/bin/elp eqwalize-allrebar3 ct --suite test/kura_sqlite_migrator_SUITE— 3/3rebar3 eunit— 39/39 (existing smoke tests still pass)