Skip to content

Conversation

@darth-raijin
Copy link
Contributor

Motivation

Some of the existing tests for the Protobuf extractor can benefit from using available input values directly, and from adding a couple of small assertions to make the tested behavior a bit more explicit.

This PR aims to strengthen the existing tests slightly, without changing any
behavior or structure. It’s a small polish to make the intent of the tests a
little clearer.

Solution

  • Where possible, we utilize the value in the input struct for asserting on the response body
  • Where missing, we also assert on the expected HTTP response status code
  • In prost_decode_error, verify that the rejection body contains the expected prefix from the ProtobufDecodeError definition.
  • Replace the hardcoded "content-type" string with the CONTENT_TYPE constant.

@yanns
Copy link
Collaborator

yanns commented Nov 23, 2025

thank you!

@yanns yanns merged commit 9bd839e into tokio-rs:main Nov 23, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants