Skip to content

test(srv): Add tracing to edihkal tests & separate test helper concerns

lazulite requested to merge 17-edihkal-test-tracing into develop

Adds tracing to edihkal's tests when enabled via TEST_LOG=1. Since the tracing setup uses bunyan, tests would be run like TEST_LOG=1 cargo test | bunyan or for a specific test TEST_LOG=1 cargo test health_check | bunyan.

Re-organizes edihkal API test helpers to separate out concerns around preparing a test database, a test service, and constructing test clients. Replaced axum-test-helper with a similar wrapper to the reqwest::Client that allows relative request paths in URLs, but without the service creation (handled elsewhere). These changes were towards more flexibility in preparing test helpers and makes it easier to set up a service for use with the HTTP/reqwest-wrapper client or e.g. an edihkal_client::Client.

Includes other misc refactor, enhancement, and style things.

Closes #17 (closed)

Edited by lazulite

Merge request reports