use std::path::PathBuf; #[cfg(test)] pub mod jmap; #[cfg(test)] pub mod smtp; #[cfg(test)] pub mod store; pub fn add_test_certs(config: &str) -> String { let mut cert_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); cert_path.push("resources"); let mut cert = cert_path.clone(); cert.push("tls_cert.pem"); let mut pk = cert_path.clone(); pk.push("tls_privatekey.pem"); config .replace("{CERT}", cert.as_path().to_str().unwrap()) .replace("{PK}", pk.as_path().to_str().unwrap()) }