Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(db): implement RefundInterface for MockDb #1277

Merged
merged 6 commits into from
Jun 3, 2023

Conversation

younes-io
Copy link
Contributor

@younes-io younes-io commented May 25, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

The main motivation is to have MockDb stubs, help to void mocking, and invocation of external database api's.
For more information check #172

Fixes #1276

How did you test it?

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

@younes-io younes-io marked this pull request as ready for review May 25, 2023 20:33
@younes-io younes-io requested a review from a team as a code owner May 25, 2023 20:33
@younes-io younes-io changed the title feat(db): implement RefundInterface for MockDb feat(db): implement RefundInterface for MockDb May 25, 2023
@prajjwalkumar17 prajjwalkumar17 added A-core Area: Core flows C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels May 26, 2023
crates/router/src/db/refund.rs Outdated Show resolved Hide resolved
crates/router/src/db/refund.rs Outdated Show resolved Hide resolved
Copy link
Member

@SanchithHegde SanchithHegde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than that, looks good to me!

Thanks for the PR, @younes-io!

crates/router/src/db/refund.rs Outdated Show resolved Hide resolved
crates/router/src/db/refund.rs Outdated Show resolved Hide resolved
Narayanbhat166
Narayanbhat166 previously approved these changes May 31, 2023
@Narayanbhat166
Copy link
Member

If possible try to handle the unwrap by raising the error. Apart from that Looks good to me.

Thanks for the Contribution @younes-io!

Copy link
Member

@SanchithHegde SanchithHegde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor change needed. Other than that, looks good to me!

Edit: Also, please address the failing CI checks.

crates/router/src/db/refund.rs Outdated Show resolved Hide resolved
@SanchithHegde SanchithHegde added S-waiting-on-author Status: This PR is incomplete or needs to address review comments and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels May 31, 2023
Younes and others added 2 commits May 31, 2023 21:09
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
@younes-io
Copy link
Contributor Author

younes-io commented May 31, 2023

One minor change needed. Other than that, looks good to me!

Edit: Also, please address the failing CI checks.

@SanchithHegde I ran cargo clippy --all locally and I didn't get any errors. I can't see the CLI errors

@SanchithHegde
Copy link
Member

I ran cargo clippy --all locally and I didn't get any errors. I can't see the CLI errors

The one warning that was thrown previously should be fixed by your latest commit.

@SanchithHegde SanchithHegde added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed and removed S-waiting-on-author Status: This PR is incomplete or needs to address review comments labels May 31, 2023
@SanchithHegde SanchithHegde added this pull request to the merge queue Jun 3, 2023
@SanchithHegde SanchithHegde added S-ready-for-merge and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jun 3, 2023
Merged via the queue into juspay:main with commit 10691c5 Jun 3, 2023
6 checks passed
@SanchithHegde
Copy link
Member

Thanks again for the PR, @younes-io!

@SanchithHegde SanchithHegde added A-framework Area: Framework and removed S-ready-for-merge A-core Area: Core flows labels Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Area: Framework C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Implement RefundInterface for MockDb
4 participants