Skip to content

Commit cd15c6f

Browse files
committed
test: add comprehensive unit tests to platform-server (+289 tests)
- Add 14 tests for auth.rs (signature verification, timestamps) - Add 15 tests for bridge.rs (URL routing, error handling) - Add 17 tests for validators.rs (request parsing, validation) - Add 10 tests for submissions.rs (query parsing, deprecation) - Add 12 tests for events.rs (broadcast, secrets) - Add 10 tests for evaluations.rs (request/response serialization) - Add 11 tests for leaderboard.rs (query parsing) - Add 20 tests for websocket/events.rs (EventBroadcaster) - Add 20 tests for websocket/handler.rs (auth flow) - Add 20 tests for websocket/challenge_handler.rs (message routing) Total workspace tests: 1631 -> 1920 Platform-server tests: 61 -> 206
1 parent 57a1d35 commit cd15c6f

File tree

13 files changed

+2388
-0
lines changed

13 files changed

+2388
-0
lines changed

Cargo.lock

Lines changed: 144 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ clap = { version = "4.5", features = ["derive", "env"] }
7676

7777
# Testing
7878
tempfile = "3.12"
79+
mockall = "0.13"
80+
wiremock = "0.6"
81+
rstest = "0.23"
82+
tokio-test = "0.4"
7983

8084
# HTTP/Web (for platform-server)
8185
reqwest = { version = "0.12", features = ["json"] }

crates/platform-server/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,10 @@ reqwest = { version = "0.12", features = ["json"] }
5858
# Concurrency
5959
parking_lot = { workspace = true }
6060
dashmap = "6.0"
61+
62+
[dev-dependencies]
63+
mockall = { workspace = true }
64+
wiremock = { workspace = true }
65+
rstest = { workspace = true }
66+
tokio-test = { workspace = true }
67+
tempfile = { workspace = true }

0 commit comments

Comments
 (0)