Skip to content

Commit

Permalink
set permision to /test
Browse files Browse the repository at this point in the history
Signed-off-by: sat0ken <[email protected]>
  • Loading branch information
sat0ken committed Oct 31, 2024
1 parent 846df14 commit 94526b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/contest/contest/src/tests/process/process_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::utils::test_inside_container;
use anyhow::{bail, Context, Ok, Result};
use oci_spec::runtime::{ProcessBuilder, Spec, SpecBuilder};
use std::fs;
use std::os::unix::fs::PermissionsExt;
use test_framework::{test_result, Test, TestGroup, TestResult};

fn create_spec() -> Result<Spec> {
Expand All @@ -28,6 +29,10 @@ fn process_test() -> TestResult {
bail!(e)
}
}
let metadata = fs::metadata("/test")?;
let mut permissions = metadata.permissions();
permissions.set_mode(0o700);

Ok(())
})
}
Expand Down

0 comments on commit 94526b2

Please sign in to comment.