pub fn cannot_query_xnet_canister(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_nns = get_random_nns_node_endpoint(&handle, &mut rng);
            endpoint_nns.assert_ready(ctx).await;
            let agent_nns = assert_create_agent(endpoint_nns.url.as_str()).await;
            let endpoint_application = get_random_verified_app_node_endpoint(&handle, &mut rng);
            endpoint_application.assert_ready(ctx).await;
            let agent_application = assert_create_agent(endpoint_application.url.as_str()).await;

            let canister_a = UniversalCanister::new(&agent_nns).await;
            let canister_b = UniversalCanister::new(&agent_application).await;

            let res = canister_a
                .query(wasm().inter_query(canister_b.canister_id(), call_args()))
                .await;
            assert_reject(res, RejectCode::CanisterReject);
        }
    });
}
/// User queries A on first subnet. A queries B on another subnet which fails.
User queries A on first subnet. A queries B on another subnet which fails.
User queries A on first subnet . A queries B on another subnet which fails .
pub fn cannot_query_xnet_canister(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_nns = get_random_nns_node_endpoint(&handle, &mut rng);
            endpoint_nns.assert_ready(ctx).await;
            let agent_nns = assert_create_agent(endpoint_nns.url.as_str()).await;
            let endpoint_application = get_random_verified_app_node_endpoint(&handle, &mut rng);
            endpoint_application.assert_ready(ctx).await;
            let agent_application = assert_create_agent(endpoint_application.url.as_str()).await;
            let canister_a = UniversalCanister::new(&agent_nns).await;
            let canister_b = UniversalCanister::new(&agent_application).await;
            let res = canister_a
                .query(wasm().inter_query(canister_b.canister_id(), call_args()))
                .await;
            assert_reject(res, RejectCode::CanisterReject);
        }
    });
}
pub fn cannot_query_xnet_canister ( 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_nns = get_random_nns_node_endpoint ( & handle , & mut rng ) ; endpoint_nns . assert_ready ( ctx ) . await ; let agent_nns = assert_create_agent ( endpoint_nns . url . as_str ( ) ) . await ; let endpoint_application = get_random_verified_app_node_endpoint ( & handle , & mut rng ) ; endpoint_application . assert_ready ( ctx ) . await ; let agent_application = assert_create_agent ( endpoint_application . url . as_str ( ) ) . await ; let canister_a = UniversalCanister :: new ( & agent_nns ) . await ; let canister_b = UniversalCanister :: new ( & agent_application ) . await ; let res = canister_a . query ( wasm ( ) . inter_query ( canister_b . canister_id ( ) , call_args ( ) ) ) . await ; assert_reject ( res , RejectCode :: CanisterReject ) ; } } ) ; }
User queries A on first subnet.
User queries A on first subnet .
handle
IcHandle
ctx
&ic_fondue::pot::Context
handle
IcHandle
ctx
&ic_fondue::pot::Context