test: fix failing unit tests (#1743)

This commit is contained in:
Sanchith Hegde
2023-07-20 15:47:01 +05:30
committed by GitHub
parent 3951561752
commit c4c94241a9
6 changed files with 140 additions and 54 deletions

View File

@ -2114,10 +2114,15 @@ pub async fn get_merchant_connector_account(
)?;
#[cfg(feature = "kms")]
let private_key = state.kms_secrets.jwekey.peek().tunnel_private_key.clone();
let private_key = state
.kms_secrets
.jwekey
.peek()
.tunnel_private_key
.as_bytes();
#[cfg(not(feature = "kms"))]
let private_key = state.conf.jwekey.tunnel_private_key.to_owned();
let private_key = state.conf.jwekey.tunnel_private_key.as_bytes();
let decrypted_mca = services::decrypt_jwe(mca_config.config.as_str(), services::KeyIdCheck::SkipKeyIdCheck, private_key, jwe::RSA_OAEP_256)
.await