Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

ci(connector-sanity-tests): fix no tests being run (#1106)

Sanchith Hegde83e1f2ce24bd
diff --git a/.github/workflows/connector-sanity-tests.yml b/.github/workflows/connector-sanity-tests.yml
index 6490c3d197..1b5256ceb2 100644
--- a/.github/workflows/connector-sanity-tests.yml
+++ b/.github/workflows/connector-sanity-tests.yml
@@ -100,4 +100,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
- args: --package router --test connectors -- ${{ matrix.connector }}"::" --test-threads=1
+ args: --package router --test connectors -- "${{ matrix.connector }}::" --test-threads=1
diff --git a/crates/router/tests/connectors/adyen.rs b/crates/router/tests/connectors/adyen.rs
index 720dd28387..80f3c17890 100644
--- a/crates/router/tests/connectors/adyen.rs
+++ b/crates/router/tests/connectors/adyen.rs
@@ -343,7 +343,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
Some(types::PaymentsAuthorizeData {
router_return_url: Some(String::from("http://localhost:8080")),
payment_method_data: types::api::PaymentMethodData::Card(api::Card {
- card_number: cards::CardNumber::from_str("1234567891011").unwrap(),
+ card_number: cards::CardNumber::from_str("4024007134364842").unwrap(),
..utils::CCardType::default().0
}),
..utils::PaymentAuthorizeType::default().0
@@ -352,10 +352,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
)
.await
.unwrap();
- assert_eq!(
- response.response.unwrap_err().message,
- "Invalid card number",
- );
+ assert_eq!(response.response.unwrap_err().message, "Refused",);
}
// Creates a payment with incorrect CVC.
diff --git a/crates/router/tests/connectors/shift4.rs b/crates/router/tests/connectors/shift4.rs
index 0818e1e57e..945911e31a 100644
--- a/crates/router/tests/connectors/shift4.rs
+++ b/crates/router/tests/connectors/shift4.rs
@@ -150,7 +150,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
.make_payment(
Some(types::PaymentsAuthorizeData {
payment_method_data: types::api::PaymentMethodData::Card(api::Card {
- card_number: cards::CardNumber::from_str("1234567891011").unwrap(),
+ card_number: cards::CardNumber::from_str("4024007134364842").unwrap(),
..utils::CCardType::default().0
}),
..utils::PaymentAuthorizeType::default().0
@@ -161,7 +161,7 @@ async fn should_fail_payment_for_incorrect_card_number() {
.unwrap();
assert_eq!(
response.response.unwrap_err().message,
- "Your request was in test mode, but used a non test card. For a list of valid test cards, visit our doc site.".to_string(),
+ "The card's security code failed verification.".to_string(),
);
}