mirror of
https://github.com/chatmail/core.git
synced 2026-05-18 22:36:29 +03:00
test: set some address for test context in decrypt_bytes()
This is needed to create pseudo transport, otherwise public key generation fails.
This commit is contained in:
@@ -589,6 +589,7 @@ mod tests {
|
|||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
|
config::Config,
|
||||||
decrypt,
|
decrypt,
|
||||||
key::{load_self_public_key, self_fingerprint, store_self_keypair},
|
key::{load_self_public_key, self_fingerprint, store_self_keypair},
|
||||||
mimefactory::{render_outer_message, wrap_encrypted_part},
|
mimefactory::{render_outer_message, wrap_encrypted_part},
|
||||||
@@ -604,6 +605,9 @@ mod tests {
|
|||||||
auth_tokens_for_decryption: &[String],
|
auth_tokens_for_decryption: &[String],
|
||||||
) -> Result<pgp::composed::Message<'static>> {
|
) -> Result<pgp::composed::Message<'static>> {
|
||||||
let t = &TestContext::new().await;
|
let t = &TestContext::new().await;
|
||||||
|
t.set_config(Config::ConfiguredAddr, Some("alice@example.org"))
|
||||||
|
.await
|
||||||
|
.expect("Failed to configure address");
|
||||||
|
|
||||||
for secret in auth_tokens_for_decryption {
|
for secret in auth_tokens_for_decryption {
|
||||||
token::save(t, token::Namespace::Auth, None, secret, 0).await?;
|
token::save(t, token::Namespace::Auth, None, secret, 0).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user