Title: SQLite test installs break with sqlite-database-integration 3.1 storage · Issue #372 · wp-cli/wp-cli-tests · GitHub
Open Graph Title: SQLite test installs break with sqlite-database-integration 3.1 storage · Issue #372 · wp-cli/wp-cli-tests
X Title: SQLite test installs break with sqlite-database-integration 3.1 storage · Issue #372 · wp-cli/wp-cli-tests
Description: Problem With WP_CLI_TEST_DBTYPE=sqlite, Given a WP installation fails against the current sqlite-database-integration 3.1 plugin. Two spots in src/Context/FeatureContext.php predate the 3.1 randomized storage layout. First, the install c...
Open Graph Description: Problem With WP_CLI_TEST_DBTYPE=sqlite, Given a WP installation fails against the current sqlite-database-integration 3.1 plugin. Two spots in src/Context/FeatureContext.php predate the 3.1 randomi...
X Description: Problem With WP_CLI_TEST_DBTYPE=sqlite, Given a WP installation fails against the current sqlite-database-integration 3.1 plugin. Two spots in src/Context/FeatureContext.php predate the 3.1 randomi...
Opengraph URL: https://github.com/wp-cli/wp-cli-tests/issues/372
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SQLite test installs break with sqlite-database-integration 3.1 storage","articleBody":"## Problem\n\nWith `WP_CLI_TEST_DBTYPE=sqlite`, `Given a WP installation` fails against the current sqlite-database-integration 3.1 plugin. Two spots in `src/Context/FeatureContext.php` predate the 3.1 randomized storage layout.\n\nFirst, the install cache explicitly copies `wp-content/database/.ht.sqlite` to and from the cache. Version 3.1 stores the database in a randomized `.ht.\u003csecret>/.ht.sqlite` file recorded in `db-path.php`, so the legacy file no longer exists. The copy emits a warning, Behat converts it to a step failure, and every scenario in the feature fails in the Background step:\n\n```\nWarning: copy(/tmp/wp-cli-test-run--XXXX/wp-content/database/.ht.sqlite): Failed to open stream: No such file or directory in vendor/wp-cli/wp-cli-tests/src/Context/FeatureContext.php\n```\n\nSecond, `copy_dir()` shells out to `cp -r %s/*`, whose glob skips dotfiles. The randomized storage directory is therefore silently dropped both when caching a fresh install and when restoring one. The recorded `db-path.php` uses `__DIR__`, so restored caches would remain portable if the directory were copied whole.\n\n## Repro\n\nSet `WP_CLI_TEST_DBTYPE=sqlite` and run any `@require-sqlite` feature that installs WordPress, for example the import suite in `Automattic/wp-cli-sqlite-command`. Every scenario fails before its first step with the warning above.\n\n## Suggested fix\n\nGuard both legacy copies with `file_exists`, since `dir_diff_copy()` already captures the whole database directory including the randomized path. Change the directory copy to include hidden files, for example `cp -r src/. dest` instead of `cp -r src/* dest`, so the 3.1 storage directory survives caching and restoring. I verified locally that both changes together make a full Behat suite pass against the 3.1 driver; neither change affects the MySQL paths.\n","author":{"url":"https://github.com/nickchomey","@type":"Person","name":"nickchomey"},"datePublished":"2026-10-28T17:35:46Z","url":"https://github.com/wp-cli/wp-cli-tests/issues/372"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d0752330-cab8-2f11-2076-aefd3a2d8cdf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED58:38C411:86A2B8:BCD109:6AFB6DE0 |
| html-safe-nonce | c741bc8a2c4b700a1dfcb513153808a8ded9fe41f5df992dce903d48e46285f4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDU4OjM4QzQxMTo4NkEyQjg6QkNEMTA5OjZBRkI2REUwIiwidmlzaXRvcl9pZCI6IjcyMzM2NTgxNzc0MDc2NDMxMDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f3966b696707cfa116ecbec2389b950ec6500381d9beead9beabe650d91f6ea0 |
| hovercard-subject-tag | issue:6084218327 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/wp-cli/wp-cli-tests/372/issue_layout |
| twitter:image | https://opengraph.githubassets.com/465b82e17cd46ebf8cd7736064ba9e6b66cf03e100c155363d714c8ce215974d/wp-cli/wp-cli-tests/issues/372 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/465b82e17cd46ebf8cd7736064ba9e6b66cf03e100c155363d714c8ce215974d/wp-cli/wp-cli-tests/issues/372 |
| og:image:alt | Problem With WP_CLI_TEST_DBTYPE=sqlite, Given a WP installation fails against the current sqlite-database-integration 3.1 plugin. Two spots in src/Context/FeatureContext.php predate the 3.1 randomi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nickchomey |
| hostname | github.com |
| expected-hostname | github.com |
| None | cca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700 |
| turbo-cache-control | no-preview |
| go-import | github.com/wp-cli/wp-cli-tests git https://github.com/wp-cli/wp-cli-tests.git |
| octolytics-dimension-user_id | 1570774 |
| octolytics-dimension-user_login | wp-cli |
| octolytics-dimension-repository_id | 134428237 |
| octolytics-dimension-repository_nwo | wp-cli/wp-cli-tests |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 134428237 |
| octolytics-dimension-repository_network_root_nwo | wp-cli/wp-cli-tests |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 88808b1fae5ab8a526a73e7ce5542a10eb9d6971 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width