diff --git a/tests/contest/contest/src/tests/process_capabilities_fail/process_capabilities_fail_test.rs b/tests/contest/contest/src/tests/process_capabilities_fail/process_capabilities_fail_test.rs index 9f8d288d0..89864aa99 100644 --- a/tests/contest/contest/src/tests/process_capabilities_fail/process_capabilities_fail_test.rs +++ b/tests/contest/contest/src/tests/process_capabilities_fail/process_capabilities_fail_test.rs @@ -31,7 +31,13 @@ fn create_spec() -> Result { fn process_capabilities_fail_test() -> TestResult { match create_spec() { Result::Ok(_) => TestResult::Failed(Error::msg("create_spec succeeded unexpectedly.")), - Err(_e) => TestResult::Passed, + Err(e) => { + if e.to_string() == "invalid capability" { + TestResult::Passed + } else { + TestResult::Failed(Error::msg(format!("unexpected error: {}", e))) + } + } } }