Bootstrap crate skeleton, dependencies, and core error types #1
Labels
No labels
area:assertions
area:cli
area:client
area:harness
area:meta
area:reporting
area:runner
type:user-story
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/ws-rpc-test#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As a framework maintainer, I want a clean Cargo crate with a module skeleton and the public
TestErrortype defined, so that subsequent stories can build their components on a stable foundation without re-deciding the public surface.Scope
Set up the Rust crate, declare dependencies, create empty module files, and implement the error types that every other module will reference.
Acceptance criteria
Cargo.tomldeclares the package and pulls in:tokio = { version = "1", features = ["full"] }tokio-tungstenite = "0.26"serde_json = "1"futures-util = "0.3"reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }anyhow = "1"colored = "2"clap = { version = "4", features = ["derive"], optional = true }src/lib.rsdeclares modules:harness,client,assert,runner,report,error, plus apreludemodule re-exporting the public surface (ProcessHarness,RpcClient,TestRunner,TestResult,TestError,json!).src/error.rsdefinesTestErrorenum with variants:Assertion { expected: String, got: String, context: Option<String>, location: &'static str }Timeout { event: String, duration: Duration }Connection(String)RpcError { code: i32, message: String }Skip(String)(new — see spec review §7)Other(anyhow::Error)pub type TestResult = Result<(), TestError>;TestErrorimplementsDisplay,Debug,From<anyhow::Error>,From<tungstenite::Error>,std::error::Error.cargo buildandcargo checksucceed on the empty modules.cargo docbuilds without warnings.Out of scope
error.rsare populated.References