5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-22 22:04:00 +03: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:
Christian Ebner 2024-06-06 10:17:11 +02:00 committed by Fabian Grünbichler
parent bab0645cc6
commit 1259234488

View File

@ -1859,6 +1859,14 @@ mod tests {
#[test]
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");
testdir.push(std::module_path!());