mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 02:43:24 +00:00
14 lines
440 B
Rust
14 lines
440 B
Rust
//! This test checks that if controlled resource not in whitelist is visited, cargo-component will report warning message.
|
|
|
|
#![feature(once_cell)]
|
|
|
|
mod test_utils;
|
|
|
|
#[test]
|
|
fn violate_policy() {
|
|
let stderr = run_cargo_component_cmd!();
|
|
assert!(stderr.contains("access controlled entry point is disallowed"));
|
|
assert!(stderr.contains("access foo::foo_add in bar"));
|
|
assert!(stderr.contains("access foo::FOO_ITEM in bar"));
|
|
}
|