diff --git a/tests/contest/contest/src/tests/linux_mount_label/linux_mount_label_test.rs b/tests/contest/contest/src/tests/linux_mount_label/linux_mount_label_test.rs index d0b5ff4dc7..987350cc91 100644 --- a/tests/contest/contest/src/tests/linux_mount_label/linux_mount_label_test.rs +++ b/tests/contest/contest/src/tests/linux_mount_label/linux_mount_label_test.rs @@ -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"), ) @@ -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(()) })