Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Gekko0114 committed Feb 24, 2024
1 parent 7562628 commit bd11f7d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ use test_framework::{Test, TestGroup, TestResult};
use oci_spec::runtime::{LinuxBuilder, ProcessBuilder, Spec, SpecBuilder};
use crate::utils::test_inside_container;

fn create_spec(linux_mount_label: &str) -> Spec {
fn create_spec(linux_mount_label: String) -> Spec {
SpecBuilder::default()
.linux(
// Need to reset the read-only paths
LinuxBuilder::default()
.mount_label(linux_mount_label)
.readonly_paths(vec![])
.build()
.expect("error in building linux config"),
)
Expand All @@ -24,9 +23,9 @@ fn create_spec(linux_mount_label: &str) -> Spec {
// here we have to manually create and manage the container
// as the test_inside container does not provide a way to set the pid file argument
fn test_linux_mount_label() -> TestResult {
let spec = create_spec("system_u:object_r:svirt_sandbox_file_t:s0:c715,c811");
let spec = create_spec("system_u:object_r:svirt_sandbox_file_t:s0:c715,c811".to_string());
test_inside_container(spec, &|_| {
// As long as the container is created, we expect the hostname to be determined
// As long as the container is created, we expect the mount label to be determined
// by the spec, so nothing to prepare prior.
Ok(())
})
Expand Down

0 comments on commit bd11f7d

Please sign in to comment.