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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
ci: fix unit tests for routing (#4743)
Shanksee276ec2d5bf
diff --git a/crates/euclid/src/frontend/dir.rs b/crates/euclid/src/frontend/dir.rsindex bc16057fbb..f2b9ab9904 100644--- a/crates/euclid/src/frontend/dir.rs+++ b/crates/euclid/src/frontend/dir.rs@@ -809,6 +809,10 @@ mod test {let mut key_names: FxHashMap<DirKeyKind, String> = FxHashMap::default();for key in DirKeyKind::iter() {+ if matches!(key, DirKeyKind::Connector) {+ continue;+ }+let json_str = if let DirKeyKind::MetaData = key {r#""metadata""#.to_string()} else {diff --git a/crates/kgraph_utils/src/mca.rs b/crates/kgraph_utils/src/mca.rsindex ed96cd9b54..b32c8c23bd 100644--- a/crates/kgraph_utils/src/mca.rs+++ b/crates/kgraph_utils/src/mca.rs@@ -716,7 +716,6 @@ mod tests {api_enums::CardNetwork::Mastercard,]),accepted_currencies: Some(AcceptedCurrencies::EnableOnly(vec![- api_enums::Currency::USD,api_enums::Currency::INR,])),accepted_countries: None,@@ -734,7 +733,6 @@ mod tests {]),accepted_currencies: Some(AcceptedCurrencies::EnableOnly(vec![api_enums::Currency::GBP,- api_enums::Currency::PHP,])),accepted_countries: None,minimum_amount: Some(10),@@ -752,14 +750,6 @@ mod tests {status: api_enums::ConnectorStatus::Inactive,};- let currency_country_flow_filter = kgraph_types::CurrencyCountryFlowFilter {- currency: Some(HashSet::from([api_enums::Currency::INR])),- country: Some(HashSet::from([api_enums::CountryAlpha2::IN])),- not_available_flows: Some(kgraph_types::NotAvailableFlows {- capture_method: Some(api_enums::CaptureMethod::Manual),- }),- };-let config_map = kgraph_types::CountryCurrencyFilter {connector_configs: HashMap::from([(api_enums::RoutableConnectors::Stripe,@@ -768,13 +758,31 @@ mod tests {kgraph_types::PaymentMethodFilterKey::PaymentMethodType(api_enums::PaymentMethodType::Credit,),- currency_country_flow_filter.clone(),+ kgraph_types::CurrencyCountryFlowFilter {+ currency: Some(HashSet::from([+ api_enums::Currency::INR,+ api_enums::Currency::USD,+ ])),+ country: Some(HashSet::from([api_enums::CountryAlpha2::IN])),+ not_available_flows: Some(kgraph_types::NotAvailableFlows {+ capture_method: Some(api_enums::CaptureMethod::Manual),+ }),+ },),(kgraph_types::PaymentMethodFilterKey::PaymentMethodType(api_enums::PaymentMethodType::Debit,),- currency_country_flow_filter,+ kgraph_types::CurrencyCountryFlowFilter {+ currency: Some(HashSet::from([+ api_enums::Currency::GBP,+ api_enums::Currency::PHP,+ ])),+ country: Some(HashSet::from([api_enums::CountryAlpha2::IN])),+ not_available_flows: Some(kgraph_types::NotAvailableFlows {+ capture_method: Some(api_enums::CaptureMethod::Manual),+ }),+ },),])),)]),@@ -838,8 +846,8 @@ mod tests {dirval!(Connector = Stripe),dirval!(PaymentMethod = Card),dirval!(CardType = Debit),- dirval!(CardNetwork = DinersClub),- dirval!(PaymentCurrency = GBP),+ dirval!(CardNetwork = Maestro),+ dirval!(PaymentCurrency = PHP),dirval!(PaymentAmount = 100),]),&mut Memoization::new(),