/// User queries canister A; A queries self which fails.
User queries canister A; A queries self which fails.
User queries canister A ; A queries self which fails .
pub fn self_loop_fails(handle: IcHandle, ctx: &ic_fondue::pot::Context) {
    let mut rng = ctx.rng.clone();
    let rt = tokio::runtime::Runtime::new().expect("Could not create tokio runtime.");
    rt.block_on({
        async move {
            let endpoint = get_random_node_endpoint(&handle, &mut rng);
            endpoint.assert_ready(ctx).await;
            let agent = assert_create_agent(endpoint.url.as_str()).await;
            let canister = UniversalCanister::new(&agent).await;
            let res = canister
                .query(wasm().inter_query(canister.canister_id(), call_args()))
                .await;
            assert_reject(res, RejectCode::CanisterError);
        }
    });
}
pub fn self_loop_fails ( handle : IcHandle , ctx : & ic_fondue :: pot :: Context ) { let mut rng = ctx . rng . clone ( ) ; let rt = tokio :: runtime :: Runtime :: new ( ) . expect ( " " ) ; rt . block_on ( { async move { let endpoint = get_random_node_endpoint ( & handle , & mut rng ) ; endpoint . assert_ready ( ctx ) . await ; let agent = assert_create_agent ( endpoint . url . as_str ( ) ) . await ; let canister = UniversalCanister :: new ( & agent ) . await ; let res = canister . query ( wasm ( ) . inter_query ( canister . canister_id ( ) , call_args ( ) ) ) . await ; assert_reject ( res , RejectCode :: CanisterError ) ; } } ) ; }
User queries canister A; A queries self which fails.
User queries canister A ; A queries self which fails .
handle
IcHandle
ctx
&ic_fondue::pot::Context