mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 13:56:30 +03:00
sql: do not reset our database if backup cannot be decrypted
This commit is contained in:
11
src/imex.rs
11
src/imex.rs
@@ -931,6 +931,17 @@ mod tests {
|
||||
|
||||
// import to context2
|
||||
let backup = has_backup(&context2, backup_dir.path().as_ref()).await?;
|
||||
|
||||
// Import of unencrypted backup with incorrect "foobar" backup passphrase fails.
|
||||
assert!(imex(
|
||||
&context2,
|
||||
ImexMode::ImportBackup,
|
||||
backup.as_ref(),
|
||||
Some("foobar".to_string())
|
||||
)
|
||||
.await
|
||||
.is_err());
|
||||
|
||||
assert!(
|
||||
imex(&context2, ImexMode::ImportBackup, backup.as_ref(), None)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user