Skip to content

Commit 373a10b

Browse files
authored
chore(scripts): add connector script changes (#2620)
1 parent 9e450b8 commit 373a10b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

connector-template/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub struct {{project-name | downcase | pascal_case}};
2727
impl api::Payment for {{project-name | downcase | pascal_case}} {}
2828
impl api::PaymentSession for {{project-name | downcase | pascal_case}} {}
2929
impl api::ConnectorAccessToken for {{project-name | downcase | pascal_case}} {}
30-
impl api::PreVerify for {{project-name | downcase | pascal_case}} {}
30+
impl api::MandateSetup for {{project-name | downcase | pascal_case}} {}
3131
impl api::PaymentAuthorize for {{project-name | downcase | pascal_case}} {}
3232
impl api::PaymentSync for {{project-name | downcase | pascal_case}} {}
3333
impl api::PaymentCapture for {{project-name | downcase | pascal_case}} {}

crates/test_utils/src/connector_auth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl ConnectorAuthentication {
7878
/// Will panic if `CONNECTOR_AUTH_FILE_PATH` env is not set
7979
#[allow(clippy::expect_used)]
8080
pub fn new() -> Self {
81-
// Do `export CONNECTOR_AUTH_FILE_PATH="/hyperswitch/crates/router/tests/connectors/sample_sample_auth.toml"`
81+
// Do `export CONNECTOR_AUTH_FILE_PATH="/hyperswitch/crates/router/tests/connectors/sample_auth.toml"`
8282
// before running tests in shell
8383
let path = env::var("CONNECTOR_AUTH_FILE_PATH")
8484
.expect("Connector authentication file path not set");
@@ -110,7 +110,7 @@ impl ConnectorAuthenticationMap {
110110
/// Will panic if `CONNECTOR_AUTH_FILE_PATH` env is not set
111111
#[allow(clippy::expect_used)]
112112
pub fn new() -> Self {
113-
// Do `export CONNECTOR_AUTH_FILE_PATH="/hyperswitch/crates/router/tests/connectors/sample_sample_auth.toml"`
113+
// Do `export CONNECTOR_AUTH_FILE_PATH="/hyperswitch/crates/router/tests/connectors/sample_auth.toml"`
114114
// before running tests in shell
115115
let path = env::var("CONNECTOR_AUTH_FILE_PATH")
116116
.expect("connector authentication file path not set");

scripts/add_connector.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ git checkout ${tests}/main.rs ${test_utils}/connector_auth.rs ${tests}/sample_au
7878

7979
# Add enum for this connector in test folder
8080
sed -i'' -e "s/mod utils;/mod ${payment_gateway};\nmod utils;/" ${tests}/main.rs
81-
sed -i'' -e "s/ pub $previous_connector: \(.*\)/\tpub $previous_connector: \1\n\tpub ${payment_gateway}: Option<HeaderKey>,/; s/auth.toml/sample_auth.toml/" ${test_utils}/connector_auth.rs
81+
sed -i'' -e "s/ pub $previous_connector: \(.*\)/\tpub $previous_connector: \1\n\tpub ${payment_gateway}: Option<HeaderKey>,/" ${test_utils}/connector_auth.rs
8282
echo "\n\n[${payment_gateway}]\napi_key=\"API Key\"" >> ${tests}/sample_auth.toml
8383

8484
# Remove temporary files created in above step

0 commit comments

Comments
 (0)