chore(testing): drop dead context.db bag from dbPlugins#5405
Merged
Conversation
Nothing in the codebase reads `context.db` anymore (the DI migration moved every reader onto storage-operations / DI abstractions), so the `context.db = new Db(...)` bag that the test-only `dbPlugins` helper sets was write-only dead weight — along with the DynamoDbDriver it constructed to feed it. Slim `dbPlugins` down to what's still live: registering `DbRegistryFeature` (the DDB-ES CMS storage resolves it in beforeInit). It now takes no args; the DDB and DDB-ES test setups call `dbPlugins()` and no longer build a throwaway driver. Removes the last `Db` instantiation in the repo. Test-only; no production change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
/vitest |
|
Vitest tests have been initiated (for more information, click here). ✨
|
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.
What changed
Test-only cleanup. The
dbPluginstest helper used to set a legacycontext.dbbag, but nothing in the codebase readscontext.dbanymore — the DI migration moved every reader onto storage-operations and DI abstractions. So that bag (and the throwaway DynamoDB driver constructed to fill it) was pure dead weight.dbPluginsis slimmed down to the one thing still live: registeringDbRegistryFeature(the DDB+OpenSearch CMS storage resolves it inbeforeInitto stage the entities it syncs). It now takes no arguments, and the DDB / DDB-ES test setups calldbPlugins()without building a driver.This removes the last
Dbinstantiation in the repo. No production code changes.Changelog
Internal test cleanup
Removed an unused legacy database context object from the test harness. No functional change.
Squash Merge Commit