This commit is contained in:
parent
3c09493b00
commit
e939714557
34 changed files with 5752 additions and 628 deletions
|
|
@ -347,7 +347,7 @@ mod tests {
|
|||
#[test]
|
||||
fn bundle_save_load_roundtrip() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let path = temp_path(BUNDLE_EXTENSION);
|
||||
let bundle = sample_keyring().public_key_bundle();
|
||||
let bundle = Keyring::generate().public_key_bundle();
|
||||
save_public_key_bundle(&bundle, &path)?;
|
||||
let loaded = load_public_key_bundle(&path)?;
|
||||
assert_eq!(bundle.as_bytes(), loaded.as_bytes());
|
||||
|
|
@ -358,7 +358,8 @@ mod tests {
|
|||
#[test]
|
||||
fn loading_bundle_as_keyring_fails_on_magic() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let path = temp_path(BUNDLE_EXTENSION);
|
||||
save_public_key_bundle(&sample_keyring().public_key_bundle(), &path)?;
|
||||
let bundle = Keyring::generate().public_key_bundle();
|
||||
save_public_key_bundle(&bundle, &path)?;
|
||||
assert!(matches!(
|
||||
load_keyring(&path, b"passphrase"),
|
||||
Err(FileError::BadMagic { .. })
|
||||
|
|
|
|||
Loading…
Reference in a new issue