Skip to content

tests: don't base64 encode text/plain request payloads when recording #6603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

LawnGnome
Copy link
Contributor

In #6326, text/plain request payloads were decoded into... well, plain text, and record::replay_http was updated to handle them accordingly. The code that records those request payloads was not updated, however, so any updated test payload will now result in failures, since a base64 encoded string will be compared against a plain text string.

This adds the same logic to record::record_http to ensure newly recorded cassettes match.

In rust-lang#6326, `text/plain` request payloads were decoded into... well, plain
text, and `record::replay_http` was updated to handle them accordingly.
The code that records those request payloads was not updated, however,
so any updated test payload will now result in failures, since a
base64 encoded string will be compared against a plain text string.

This adds the same logic to `record::record_http` to ensure newly
recorded cassettes match.
@LawnGnome LawnGnome added the C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear label Jun 13, 2023
@LawnGnome LawnGnome requested a review from Turbo87 June 13, 2023 01:28
Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, good catch! :D

@Turbo87 Turbo87 merged commit 6cb7b98 into rust-lang:master Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants