ci: fix unit tests for routing (#4743)

This commit is contained in:
Shanks
2024-05-23 14:44:29 +05:30
committed by GitHub
parent c778af26dd
commit ee276ec2d5
2 changed files with 26 additions and 14 deletions

View File

@ -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(),