We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0e3cb8 commit f8994faCopy full SHA for f8994fa
src/fs.rs
@@ -53,3 +53,16 @@ pub async fn load_secret_key(key_path: PathBuf) -> anyhow::Result<SecretKey> {
53
Ok(secret_key)
54
}
55
56
+
57
+#[cfg(test)]
58
+mod tests {
59
+ use super::load_secret_key;
60
+ #[tokio::test]
61
+ async fn secret_key_roundtrip() {
62
+ let dir = tempfile::tempdir().unwrap();
63
+ let path = dir.path().join("key");
64
+ let key1 = load_secret_key(path.clone()).await.unwrap();
65
+ let key2 = load_secret_key(path).await.unwrap();
66
+ assert_eq!(key1.to_bytes(), key2.to_bytes());
67
+ }
68
+}
0 commit comments