Skip to main content

tatara_testing/
lib.rs

1//! Test infrastructure for tatara.
2//!
3//! Provides an in-memory mock of the tatara API that doesn't require
4//! Raft consensus, gossip membership, or any networking. This enables:
5//!
6//! - **API integration tests**: Full HTTP round-trip tests against a virtualized tatara server
7//! - **Forge workflow tests**: End-to-end forge lifecycle testing (submit -> schedule -> release)
8//! - **Scheduler tests**: Property-based testing of scheduling invariants
9//!
10//! # Usage
11//!
12//! ```rust,no_run
13//! use tatara_testing::TestServer;
14//!
15//! #[tokio::test]
16//! async fn test_submit_job() {
17//!     let server = TestServer::new();
18//!     let response = server.post("/api/v1/jobs", &job_spec).await;
19//!     assert_eq!(response.status(), 200);
20//! }
21//! ```
22
23pub mod fixtures;
24pub mod server;
25pub mod store;
26
27pub use fixtures::*;
28pub use server::TestServer;
29pub use store::InMemoryStore;