feat(db): Implement interfaces for `MockDb`
- Dominant language
- Rust
- Stars
- 43.7k
- Forks
- 5.1k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 205
Description
## Description
This issue's primary focus lies in implementing the pending interface functionality for [`MockDb`](https://github.com/juspay/hyperswitch/blob/f624eb52d61561c365cce21e58b08281d096d904/crates/router/src/db.rs#L79). The purpose of this change is to have a simple and effective mechanism for testing without connecting to any outside entity for the storage need. The `MockDb` will come in play for unit tests, integration tests, etc.
## Interfaces to implement
- [x] #954
- [x] #996
- [x] #1189
- [x] #997
- [ ] Implement `ConnectorResponseInterface` for `MockDb` (partially complete)
- [ ] Implement `CustomerInterface` for `MockDb` (partially complete)
- [x] #1190
- [x] #1191
- [x] #1116
- [x] #1257
- [x] #1256
- [x] #2438
- [x] #1123
- [ ] #1329
- [ ] Implement `PaymentIntentInterface` for `MockDb` (partially complete)
- [x] #1491
- [ ] #4150
- [ ] Implement `ProcessTrackerInterface` for `MockDb` (partially complete)
- [ ] #1490
- [x] #1276
- [x] #1115
- [x] #1697
- [x] #2039
- [ ] Implement BatchSampleDataInterface for `MockDb`
- [x] https://github.com/juspay/hyperswitch/issues/3044
- [ ] Implement `GenericLink` for `MockDb`.
If you're interested in picking up any item from the list, please let us know. We'll spin out an issue and assign it to you.
Contributor guide
Research direction
Start at crates/router/src/db.rs around the linked MockDb definition and review the unchecked interface items in the issue. Confirm with maintainers which interface is in scope before making changes, since the issue lists several partial implementations and unassigned items. Done should be the specifically selected interface implemented for MockDb, with relevant unit or integration test coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- database, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100