From bd11f7da7be52d1ed452c04bf4aa48ef8722847d Mon Sep 17 00:00:00 2001 From: Hiroyuki Moriya <41197469+Gekko0114@users.noreply.github.com> Date: Sat, 24 Feb 2024 13:36:06 +0000 Subject: [PATCH] update --- .../src/tests/linux_mount_label/linux_mount_label_test.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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(()) })