mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-07 17:18:03 +03:00
api types: extend backup archive name parsing tests
and also test the error triggered by a directory path being passed in. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
db5bf33cfe
commit
83810759ee
@ -1817,7 +1817,13 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_invalid_backup_archive_names() {
|
||||
let invalid_archive_names = ["/invalid/", "/invalid/..", "/invalid/archive-name.invalid"];
|
||||
let invalid_archive_names = [
|
||||
"/invalid/",
|
||||
"/invalid/archive-name.pxar/",
|
||||
"/invalid/archive-name.pxar.didx/",
|
||||
"/invalid/..",
|
||||
"/invalid/archive-name.invalid",
|
||||
];
|
||||
|
||||
for archive_name in invalid_archive_names {
|
||||
assert!(BackupArchiveName::from_path(archive_name).is_err());
|
||||
|
Loading…
Reference in New Issue
Block a user