/// User queries A; A queries non-existent canister; A sends error to user;
User queries A; A queries non-existent canister; A sends error to user.
User queries A ; A queries non - existent canister ; A sends error to user .
pub fn canister_queries_non_existent(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_a = UniversalCanister::new(&agent).await;
            let non_existent = CanisterId::from(12345);
            let res = canister_a
                .query(wasm().inter_query(non_existent, call_args()))
                .await;
            assert_reject(res, RejectCode::CanisterReject);
        }
    });
}
pub fn canister_queries_non_existent ( 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_a = UniversalCanister :: new ( & agent ) . await ; let non_existent = CanisterId :: from ( 12345 ) ; let res = canister_a . query ( wasm ( ) . inter_query ( non_existent , call_args ( ) ) ) . await ; assert_reject ( res , RejectCode :: CanisterReject ) ; } } ) ; }
User queries A; A queries non-existent canister; A sends error to user;
User queries A ; A queries non - existent canister ; A sends error to user ;
handle
IcHandle
ctx
&ic_fondue::pot::Context