Expand description
End-to-end test framework for streamling.
This crate provides utilities for running e2e tests against a k3s cluster with PostgreSQL, Kafka (Redpanda), ClickHouse, and Prometheus.
§Design Principles
- No streamling dependencies: This crate only depends on client libraries. Streamling is executed as an external binary.
- Resource isolation: Each test creates unique databases/topics via UUIDs.
- Automatic cleanup: Resources are cleaned up when
TestContextis dropped.
§Example
ⓘ
use streamling_e2e::TestContext;
#[tokio::test]
async fn test_kafka_to_postgres() {
let ctx = TestContext::new().await.unwrap();
// Seed data
ctx.produce_json_records(&ctx.kafka_topic, records).await.unwrap();
// Run streamling
let status = ctx.run_streamling(&pipeline_yaml).await.unwrap();
assert!(status.success());
// Verify results
let count = ctx.postgres.count("SELECT COUNT(*) FROM output").await.unwrap();
assert_eq!(count, 100);
}Re-exports§
pub use resources::PrintSinkOutput;pub use resources::PrintSinkRow;pub use streamling::StreamlingOutput;
Modules§
- inspect
- Test inspection utilities for debugging e2e tests.
- resources
- Resource managers for creating and cleaning up isolated test resources.
- streamling
- Streamling binary execution helpers.
Structs§
- E2eConfig
- Configuration for the e2e test environment
- Pipeline
Opts - Options for running a pipeline
- Test
Context - Test context providing isolated resources for a single test
- Test
Context Options - Options for creating a test context
Enums§
- E2eError
- Errors that can occur during e2e testing
Functions§
- init_
tracing - Initialize tracing for tests