Skip to main content

Crate rustvello_test_suite

Crate rustvello_test_suite 

Source
Expand description

Shared test definitions for rustvello backend implementations.

This crate provides reusable async test functions that exercise the abstract traits ([Broker], [Orchestrator], [StateBackend], etc.) Each backend crate (mem, sqlite, redis, …) calls these functions with its own concrete implementation to verify consistent behavior.

§Usage

// In crates/rustvello-mem/tests/suite.rs
use rustvello_mem::broker::MemBroker;

#[tokio::test]
async fn suite_broker_route_and_retrieve() {
    let broker = MemBroker::new();
    rustvello_test_suite::broker::test_route_and_retrieve(&broker).await;
}

Modules§

broker
Shared broker test definitions.
client_data_store
Shared client data store test definitions.
concurrency
Dedicated concurrency control test suite.
helpers
Shared test helpers.
isolation
App-ID isolation tests.
lifecycle
Shared lifecycle test definitions.
orchestrator
Shared orchestrator test definitions.
state_backend
Shared state backend test definitions.
trigger
Shared trigger store test definitions.

Macros§

async_broker_suite
Async-setup variant of broker_suite! for backends that require asynchronous initialisation (e.g. testcontainers).
async_client_data_store_suite
Async-setup variant of client_data_store_suite! for testcontainers backends.
async_concurrency_suite
Async-setup variant for testcontainers backends.
async_isolation_suite
Generate #[ignore] integration tests that exercise app-ID isolation for every backend component.
async_lifecycle_suite
Async-setup variant of lifecycle_suite! for testcontainers backends.
async_orchestrator_suite
Async-setup variant of orchestrator_suite! for testcontainers backends.
async_state_backend_suite
Async-setup variant of state_backend_suite! for testcontainers backends.
async_trigger_suite
Async-setup variant of trigger_suite! for testcontainers backends.
broker_suite
Macro to generate all broker suite tests for a given setup expression.
client_data_store_suite
Macro to generate all client data store suite tests for a given setup expression.
concurrency_suite
Macro to generate all concurrency control suite tests.
lifecycle_suite
Macro to generate all lifecycle suite tests for a given backend triple setup.
orchestrator_suite
Macro to generate all orchestrator suite tests.
state_backend_suite
Macro to generate all state backend suite tests.
trigger_suite
Macro to generate all trigger suite tests for a given setup expression.