You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
Markdown
41 lines
1.4 KiB
Markdown
+++
|
|
title = "Set up tests/Cargo.toml with integration test dependencies (reqwest/hyper, tokio, serde_json)"
|
|
priority = 8
|
|
status = "todo"
|
|
ticket_type = "task"
|
|
dependencies = ["ce1e4f", "0d84fa"]
|
|
+++
|
|
|
|
<context>
|
|
Integration tests live in `tests/` and exercise the API binary against a temporary SQLite database. They run with `cargo test` and must not require a running Cloudflare environment. The test harness spawns the API server on a random port and returns the base URL.
|
|
</context>
|
|
|
|
<goal>
|
|
Add integration test dependencies to `Cargo.toml` under `[dev-dependencies]`. Resolve TRIAGE ticket 0d84fa (HTTP client selection) first, then add the chosen HTTP client, plus `tokio` (test runtime), `serde_json`, and any other test utilities.
|
|
</goal>
|
|
|
|
<constraints>
|
|
- Resolve TRIAGE ticket 0d84fa (HTTP client: reqwest vs hyper vs ureq) before adding the dependency.
|
|
- Integration tests in `tests/` run on the host target only — dev-dependencies do not need WASM compatibility.
|
|
- Use `#[tokio::test]` for async test functions.
|
|
</constraints>
|
|
|
|
<skills>
|
|
Use `superpowers:verification-before-completion` — run `cargo check` after adding deps to confirm they resolve.
|
|
</skills>
|
|
|
|
<validation>
|
|
Run in order from the `quotesdb/` directory:
|
|
|
|
```sh
|
|
cargo fmt
|
|
cargo check
|
|
cargo clippy
|
|
cargo test
|
|
```
|
|
</validation>
|
|
|
|
<commit>
|
|
`chore(quotesdb): set up integration test dependencies in Cargo.toml`
|
|
</commit>
|