-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1161: Log assertions: add assertions for API log errors
5d49d48 test: [#1152] write assertions when API writes errors into logs (Jose Celano) cc2840f feat: add an option to pass the request id in the API client (Jose Celano) 88d3d49 feat: add server socket address to logs in API (Jose Celano) Pull request description: It adds test assertions for log errors in the context of the tracker API. Sample `ERROR` log: ```console cargo test -- --nocapture servers::api::v1::contract::authentication::should_not_authenticate_requests_when_the_token_is_empty ``` ```output 2024-12-26T11:13:00.203024Z ERROR API: response latency_ms=0 status_code=500 Internal Server Error server_socket_addr=127.0.0.1:35409 request_id=922cffeb-ed64-4d56-bbd0-400d6ea6f8d2 ``` We are using the `request_id` to find the log line because the tracing setup is global (shared by all tests). When the tracker API request is sent, the `request_id` is injected as an HTTP header. Top commit has no ACKs. Tree-SHA512: 0430296e2a9ca39b29fbd2cf34e73086c1084a80d58a8ac3994ee834713fe48c710b168d47929ef18240ef37e3fc98480b6ca15ba7313161981c2f0f5118dbbd
- Loading branch information
Showing
9 changed files
with
504 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.