Fixing broken test
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user