feat(execution-engine)!: add error-code invariant check for match/mismatch (#622)

This commit is contained in:
raftedproc
2023-07-16 17:53:01 +03:00
committed by GitHub
parent d195152320
commit 33a9d9f32f
4 changed files with 19 additions and 13 deletions

View File

@ -210,15 +210,17 @@ mod tests {
#[test]
fn test_call_result_error() {
let script = r#"
(seq
(call "peer1" ("service" "func") [] arg) ; err = {"ret_code":12,"result":"ERROR MESSAGE"}
(call "peer2" ("service" "func") [arg]) ; ok = 43
)
"#;
let exec = AirScriptExecutor::<NativeAirRunner>::new(
TestRunParameters::from_init_peer_id("init_peer_id"),
vec![],
std::iter::empty(),
r#"(seq
(call "peer1" ("service" "func") [] arg) ; err = {"ret_code":12,"result":"ERROR MESSAGE"}
(call "peer2" ("service" "func") [arg]) ; ok = 43
)
"#,
script,
)
.unwrap();