eckyputrady / testable-rust-web-project

A reference on structuring a Rust project for testability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testable Rust Web Project

An example project that implements Ports-and-Adapters pattern. This pattern helps with testability of the project.

Read the accompanying article that explains this repository: Structuring Rust Project For Testability.

Running The Test

Setup the infrastructure required for testing via Docker:

$ sudo docker stack deploy -c test-stack.yml testable-rust-web-project

Run the test:

$ cargo test

Running The Application

Setup the infrastructure required for running the application via Docker:

$ sudo docker stack deploy -c test-stack.yml testable-rust-web-project

Run the application:

$ cargo run

Interact with the application using curl or other HTTP testing tools.

About

A reference on structuring a Rust project for testability


Languages

Language:Rust 99.3%Language:Shell 0.7%