diff --git a/src/domain/acme/store.rs b/src/domain/acme/store.rs index 8887b62..5f1ad27 100644 --- a/src/domain/acme/store.rs +++ b/src/domain/acme/store.rs @@ -166,7 +166,7 @@ impl Store for FSStore { #[cfg(test)] mod tests { use super::*; - use crate::domain::acme; + use crate::domain::tls; use tempdir::TempDir; #[test] @@ -179,7 +179,7 @@ mod tests { Err::(GetAccountKeyError::NotFound) )); - let k = acme::PrivateKey::new(); + let k = tls::PrivateKey::new(); store.set_account_key(&k).expect("account private key set"); diff --git a/src/origin/git.rs b/src/origin/git.rs index 6535be4..090ad09 100644 --- a/src/origin/git.rs +++ b/src/origin/git.rs @@ -379,9 +379,15 @@ mod tests { }; let assert_file_not_empty = |path: &str| { - let f = store.get_file(&descr, path).expect("file not retrieved"); + use bytes::BufMut; + + let mut f = store.get_file(&descr, path).expect("file not retrieved"); + let mut body = bytes::BytesMut::new(); + async move { - let body = f.map(|r| r.unwrap()).concat().await; + while let Some(chunk) = f.next().await { + body.put(chunk.unwrap()) + } assert!(body.len() > 0); } };