TimeSpan: parse via FromStr
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
7f6c169b25
commit
645d52308b
|
@ -5,7 +5,6 @@
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use anyhow::Error;
|
use anyhow::Error;
|
||||||
|
|
||||||
use proxmox_time::parse_time_span;
|
|
||||||
use pbs_api_types::{RetentionPolicy, MediaSetPolicy};
|
use pbs_api_types::{RetentionPolicy, MediaSetPolicy};
|
||||||
|
|
||||||
use crate::tape::{Inventory, MediaPool};
|
use crate::tape::{Inventory, MediaPool};
|
||||||
|
@ -149,7 +148,7 @@ fn test_alloc_writable_media_4() -> Result<(), Error> {
|
||||||
"p1",
|
"p1",
|
||||||
&testdir,
|
&testdir,
|
||||||
MediaSetPolicy::AlwaysCreate,
|
MediaSetPolicy::AlwaysCreate,
|
||||||
RetentionPolicy::ProtectFor(parse_time_span("12s")?),
|
RetentionPolicy::ProtectFor("12s".parse()?),
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
false,
|
false,
|
||||||
|
|
Loading…
Reference in New Issue