From 10650e2b1653e50b73b08ed0810bfa273cdb3bfd Mon Sep 17 00:00:00 2001 From: Tim Zhang Date: Mon, 9 Nov 2020 18:58:05 +0800 Subject: [PATCH] Update tests to adapt new type of fields in resource The type has been changed to Option type. Signed-off-by: Tim Zhang --- tests/builder.rs | 2 +- tests/resources.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/builder.rs b/tests/builder.rs index fced12a..cb19bfa 100644 --- a/tests/builder.rs +++ b/tests/builder.rs @@ -159,7 +159,7 @@ pub fn test_blkio_res_build() { let h = Box::new(&*h); let cg: Cgroup = CgroupBuilder::new("test_blkio_res_build", h) .blkio() - .weight(Some(100)) + .weight(100) .done() .build(); diff --git a/tests/resources.rs b/tests/resources.rs index 665e4d0..4047124 100644 --- a/tests/resources.rs +++ b/tests/resources.rs @@ -16,8 +16,7 @@ fn pid_resources() { { let res = Resources { pid: PidResources { - update_values: true, - maximum_number_of_processes: MaxValue::Value(512), + maximum_number_of_processes: Some(MaxValue::Value(512)), }, ..Default::default() };