Adapt Behat tests to SQLite integration plugin v3.0.0 - #635
Conversation
The SQLite Database Integration plugin released v3.0.0 on 2026-08-13, which replaces the old translation layer with a new MySQL-on-SQLite driver. The nightly Behat runs started failing on the same commit that had passed hours earlier, since `wp-cli-tests` always fetches the stable plugin version. Two behavior changes: * Post dates passed in ISO 8601 format are now normalized just like MySQL does, so `wp post get --field=post_date` returns `2005-01-24 09:52:00` instead of the raw input. The separate `@require-sqlite` scenario that asserted the unnormalized value is no longer needed, so the MySQL and SQLite scenarios are merged back into one. * Establishing a database connection now fails when `MULTISITE` is defined in `wp-config.php` while the database is still empty. The information schema reconstructor queries the `wp_blogs` table to collect the schema of every site, and that table does not exist yet during `wp core multisite-install`. WordPress then reports "One or more database tables are unavailable." Both affected scenarios are marked `@skip-sqlite` until the plugin handles a missing `wp_blogs` table. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XonoKYvyXFeMfLDpdd2kPp
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughUpdated feature scenarios for database-specific execution. Removed a MySQL requirement and a duplicate SQLite scenario. Added SQLite skip tags and documentation for two multisite site-creation scenarios. ChangesDatabase coverage updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This PR updates SQLite-specific Behat scenarios to match the integration plugin's current behavior and skips two scenarios blocked by an upstream SQLite issue; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XonoKYvyXFeMfLDpdd2kPp
Why
The nightly Behat runs started failing on all SQLite jobs, on a commit that had passed a few hours earlier (run 31708330441 green vs. run 31762015299 red, both on
893fbd6). Nothing changed here — SQLite Database Integration v3.0.0 was released on 2026-08-13, andwp-cli-testsalways fetches the current stable version from wordpress.org. v3.0.0 replaces the old translation layer with a new MySQL-on-SQLite driver, which changes behaviour in two places we assert on.What changed
post.feature: the SQLite workaround is now the bug. Passing a date in ISO 8601 format used to be stored verbatim by the old driver (WordPress/sqlite-database-integration#52), so the suite carried a separate@require-sqlitecopy of the scenario asserting2005-01-24T09:52:00.000Z. The new driver normalizes it the way MySQL does, sowp post get --field=post_datenow returns2005-01-24 09:52:00on both. The two scenarios are merged back into a single untagged one, as the comment on the duplicate anticipated.site-create.feature: two scenarios marked@skip-sqlite. Establishing a database connection now fails whenMULTISITEis defined inwp-config.phpwhile the database is still empty:The reconstructor checks
is_multisite()duringdb_connect()and querieswp_blogsto collect the schema of every site, but that table does not exist yet duringwp core multisite-install. The exception leaves$wpdb->last_errorset, sois_blog_installed()takes thedead_db()branch and the command fails with "One or more database tables are unavailable. The database may need to be repaired."Only these two scenarios hit it, because they define
MULTISITEup front. The other multisite scenarios install a single site first and then runwp core multisite-convert, sowp_blogsexists by the timeMULTISITEis defined. This one is an upstream bug rather than something to fix here, reported as WordPress/sqlite-database-integration#490 — the scenarios carry a@skip-sqlitetag and a note pointing at it, so the tag can come off once it is resolved.Testing
Run locally against WordPress 6.9 with the SQLite plugin at v3.0.0:
features/post.feature19/19 andfeatures/site-create.feature18/18 scenarios passing, and the full suite at 445 passed / 9 failed — all nine failures being scenarios that need network access towordpress.organds.w.org, which my sandbox blocks.Summary by CodeRabbit