Fixing broken test

This commit is contained in:
Dave Hrycyszyn
2024-06-06 18:55:48 +01:00
parent cda6dd2901
commit da29d681d8
2 changed files with 9 additions and 4 deletions

View File

@@ -36,6 +36,11 @@ fn ensure_side_directory_exists(side_dir: &PathBuf) -> Result<(), std::io::Error
mod tests {
use std::{fs, path::Path};
use fastcrypto::{
ed25519::Ed25519KeyPair,
traits::{EncodeDecodeBase64, KeyPair, ToFromBytes},
};
use super::*;
fn default_side_node_config() -> SideNodeConfig {
@@ -69,8 +74,9 @@ mod tests {
assert!(file_path.exists());
// check that the pem is readable
let pem = fs::read_to_string(file_path).unwrap();
assert!(pem::parse_many(&pem).is_ok());
let data = fs::read_to_string(file_path).expect("couldn't read key file");
let keys = Ed25519KeyPair::decode_base64(&data).expect("couldn't load keypair from file");
assert_eq!(keys.public().as_bytes().len(), 32);
}
#[test]