mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-29 17:15:57 +00:00
sys: fs: move tests to a sub-module
This ensures that test code is not compiled in regular builds Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
parent
299a478f15
commit
bcd134a349
@ -152,16 +152,21 @@ fn create_path_at_do(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[cfg(test)]
|
||||||
fn test_create_path() {
|
mod tests {
|
||||||
create_path(
|
use super::*;
|
||||||
"testdir/testsub/testsub2/testfinal",
|
|
||||||
Some(CreateOptions::new().perm(stat::Mode::from_bits_truncate(0o755))),
|
#[test]
|
||||||
Some(
|
fn test_create_path() {
|
||||||
CreateOptions::new()
|
create_path(
|
||||||
.owner(nix::unistd::Uid::effective())
|
"testdir/testsub/testsub2/testfinal",
|
||||||
.group(nix::unistd::Gid::effective()),
|
Some(CreateOptions::new().perm(stat::Mode::from_bits_truncate(0o755))),
|
||||||
),
|
Some(
|
||||||
)
|
CreateOptions::new()
|
||||||
.expect("expected create_path to work");
|
.owner(nix::unistd::Uid::effective())
|
||||||
|
.group(nix::unistd::Gid::effective()),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.expect("expected create_path to work");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user