mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-08 09:06:47 +00:00
client: pxar: conditionally skip metadata reference test
The test will fail for all users not having euid/egid set to 1000/1000, as the reference test folder structure cannot be created with the expected ownership. Therefore, skip over the test if either euid or egid do not match this condition. Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
bab0645cc6
commit
1259234488
@ -1859,6 +1859,14 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_create_archive_with_reference() -> Result<(), Error> {
|
fn test_create_archive_with_reference() -> Result<(), Error> {
|
||||||
|
let euid = unsafe { libc::geteuid() };
|
||||||
|
let egid = unsafe { libc::getegid() };
|
||||||
|
|
||||||
|
if euid != 1000 || egid != 1000 {
|
||||||
|
// skip test, cannot create test folder structure with correct ownership
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let mut testdir = PathBuf::from("./target/testout");
|
let mut testdir = PathBuf::from("./target/testout");
|
||||||
testdir.push(std::module_path!());
|
testdir.push(std::module_path!());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user