linera-io / linera-protocol

Main repository for the Linera protocol
Apache License 2.0
1.34k stars 161 forks source link

Allow intercepting HTTP requests in integration tests #2651

Open jvff opened 1 week ago

jvff commented 1 week ago

Motivation

It is possible to perform HTTP requests from within Linera application contracts. However, when running integration tests those requests will be executed on a real network, which might not be desired.

Proposal

Provide a way to configure the TestValidator to intercept the HTTP requests, and maybe forward them to a custom handler.

ma2bd commented 1 week ago

We also need a notion of HTTP proxy to make sure that queries to the external web are indeed external. This could be related.