rapace-testkit 0.1.0

Conformance test suite for rapace transports
Documentation

rapace-testkit: Conformance test suite for rapace transports.

Provides TransportFactory trait and shared test scenarios that all transports must pass.

Usage

Each transport crate implements TransportFactory and runs the shared tests:

use rapace_testkit::{TransportFactory, TestError};

struct MyTransportFactory;

impl TransportFactory for MyTransportFactory {
    type Transport = MyTransport;

    fn connect_pair() -> impl Future<Output = Result<(Self::Transport, Self::Transport), TestError>> + Send {
        async { /* create connected pair */ }
    }
}

#[tokio::test]
async fn my_transport_unary_happy_path() {
    rapace_testkit::run_unary_happy_path::<MyTransportFactory>().await;
}