[PM-35680] chore: Remove unused MockSdkCipherRepository#2805
Open
matt-livefront wants to merge 1 commit into
Open
[PM-35680] chore: Remove unused MockSdkCipherRepository#2805matt-livefront wants to merge 1 commit into
matt-livefront wants to merge 1 commit into
Conversation
Contributor
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR deletes the unused Code Review DetailsNo findings. Clean, well-scoped dead-code removal with an accurate description. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2805 +/- ##
==========================================
+ Coverage 80.80% 80.83% +0.02%
==========================================
Files 1019 1019
Lines 64849 64849
==========================================
+ Hits 52402 52418 +16
+ Misses 12447 12431 -16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🎟️ Tracking
PM-35680
📔 Objective
Removes the bespoke
MockSdkCipherRepositorytest helper, which is dead code.It was introduced in #1738 (PM-13607, SDK client-managed state registration) and used in exactly one place —
ClientServiceTestsstubbedsdkRepositoryFactory.makeCipherRepositoryReturnValue = MockSdkCipherRepository().In #2584 (SDK update to 2.0.0-4880) the SDK factory API changed from
makeCipherRepository() -> CipherRepositorytomakeRepositories() -> Repositories(a struct bundling all client-managed repos). That PR rewrote the test to usemakeRepositoriesReturnValue = BitwardenSdk.Repositories(cipher: nil, ...), which removed the mock's only reference — but the file itself was left behind.There is no longer any consumer for the mock, and there isn't a natural one: the app only ever produces a
CipherRepository(viaSdkRepositoryFactory, handed to the SDK) — it never injects one into a unit under test, which is the only scenario a mock would serve. The two tests that touch ciphers don't need it:ClientServiceTests.test_client_registersClientManagedRepositoriespassescipher: niland only asserts the factory was called.SdkRepositoryFactoryTests.test_makeRepositoriesasserts the factory returns the realSdkCipherRepository, so it can't use a mock.Rather than convert the mock to Sourcery
AutoMockable, it's deleted outright to drop the maintenance surface.