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

test(connector): [Globalpay] Fix unit tests #1217

Merged
merged 19 commits into from
Jun 15, 2023
Merged

Conversation

srujanchikke
Copy link
Contributor

@srujanchikke srujanchikke commented May 19, 2023

Type of Change

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

Description

This PR contains following changes
1)unit tests for globalpay
2)expiry year fix

Additional Changes

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

Motivation and Context

unit tests for globalpay

How did you test it?

unit tests
Note : should_fail_void_payment_for_auto_capture is failing from connector end .

Screenshot 2023-05-29 at 11 56 41 AM

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

@srujanchikke srujanchikke added A-connector-integration Area: Connector integration R-waiting-on-L1 Review: Waiting on L1 reviewer labels May 19, 2023
@srujanchikke srujanchikke self-assigned this May 19, 2023
@srujanchikke srujanchikke requested review from a team, jarnura and ashokkjag as code owners May 19, 2023 19:54
@srujanchikke srujanchikke added the C-refactor Category: Refactor label May 19, 2023
@srujanchikke srujanchikke linked an issue May 20, 2023 that may be closed by this pull request
@SanchithHegde SanchithHegde changed the title fix(connector) : [Globalpay] fix globalpay unit tests test(connector) : [Globalpay] Fix unit tests May 20, 2023
@github-actions github-actions bot added the S-conventions-not-followed Status: This PR does not follow contributing guidelines label May 20, 2023
@SanchithHegde SanchithHegde changed the title test(connector) : [Globalpay] Fix unit tests test(connector): [Globalpay] Fix unit tests May 20, 2023
@github-actions github-actions bot removed the S-conventions-not-followed Status: This PR does not follow contributing guidelines label May 20, 2023
@srujanchikke srujanchikke added the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label May 21, 2023
SanchithHegde
SanchithHegde previously approved these changes May 22, 2023
Cargo.lock Outdated
@@ -364,7 +364,6 @@ name = "api_models"
version = "0.1.0"
dependencies = [
"actix-web",
"cards",
Copy link
Contributor

Choose a reason for hiding this comment

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

undo all the changes in this file

SanchithHegde
SanchithHegde previously approved these changes May 24, 2023
Copy link
Contributor

@ArjunKarthik ArjunKarthik left a comment

Choose a reason for hiding this comment

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

@srujanchikke There are changes in the connector auth please add the label api contract changes. So that we can mark dashboard dependency while releasing this changes in the release announcements

.make_payment(
Some(types::PaymentsAuthorizeData {
payment_method_data: types::api::PaymentMethodData::Card(api::Card {
card_number: cards::CardNumber::from_str("").unwrap(),
Copy link
Contributor

Choose a reason for hiding this comment

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

This test fails for empty card number can you rerun and check this?

.make_payment(
Some(types::PaymentsAuthorizeData {
payment_method_data: types::api::PaymentMethodData::Card(api::Card {
card_number: cards::CardNumber::from_str("13241313413").unwrap(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, this would fail because of Kuhn check we have. Please rerun and check

@ArjunKarthik ArjunKarthik 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 29, 2023
Signed-off-by: chikke srujan <[email protected]>
@srujanchikke srujanchikke 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 29, 2023
@srujanchikke srujanchikke removed the R-waiting-on-L1 Review: Waiting on L1 reviewer label May 31, 2023
@jagan-jaya jagan-jaya added S-ready-for-merge and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Jun 9, 2023
@jagan-jaya jagan-jaya enabled auto-merge June 9, 2023 13:04
@jagan-jaya jagan-jaya added this pull request to the merge queue Jun 15, 2023
Merged via the queue into main with commit 71c0d4c Jun 15, 2023
@SanchithHegde SanchithHegde deleted the unit_test_for_global_pay branch June 17, 2023 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-refactor Category: Refactor
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

fix(connector) : [Globalpay] unit tests for globalpay
4 participants