diff --git a/src/tape/inventory.rs b/src/tape/inventory.rs index d56b2144..93d72057 100644 --- a/src/tape/inventory.rs +++ b/src/tape/inventory.rs @@ -40,7 +40,20 @@ use proxmox::tools::{ }; use pbs_systemd::time::compute_next_event; -use pbs_config::{open_backup_lockfile, BackupLockGuard}; +use pbs_config::BackupLockGuard; + +#[cfg(not(test))] +use pbs_config::open_backup_lockfile; + +#[cfg(test)] +fn open_backup_lockfile>( + _path: P, + _timeout: Option, + _exclusive: bool, +) -> Result { + Ok(unsafe { pbs_config::create_mocked_lock() }) +} + use crate::{ api2::types::{