Skip to content

tests: Replace assert_eq! with assert_snapshot! for status code checks #11346

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, 2025

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Jun 12, 2025

This commit updates test assertions to use insta::assert_snapshot! for HTTP status code checks across various test files. This makes it easier to update the assertions in case status codes for certain errors are changed/fixed.

Unfortunately, this changes the numbering of the file-based snapshots, which causes the diff to look much larger than it actually is... 🙈

@Turbo87 Turbo87 force-pushed the status-snapshots branch from 2b3b2d7 to 0ce682e Compare June 12, 2025 10:21
@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Jun 12, 2025
@Turbo87 Turbo87 force-pushed the status-snapshots branch from 0ce682e to 4c21c3e Compare June 12, 2025 10:42
@Turbo87 Turbo87 requested a review from a team June 12, 2025 17:21
@Turbo87 Turbo87 force-pushed the status-snapshots branch from 4c21c3e to d9df4b9 Compare June 13, 2025 08:44
…hecks

This commit updates test assertions to use `insta::assert_snapshot!` for HTTP status code checks across various test files. This makes it easier to update the assertions in case status codes for certain errors are changed/fixed.

Unfortunately, this changes the numbering of the file-based snapshots, which causes the diff to look much larger than it actually is... 🙈
@Turbo87 Turbo87 force-pushed the status-snapshots branch from d9df4b9 to 7c3731e Compare June 13, 2025 09:42
@Turbo87 Turbo87 enabled auto-merge (squash) June 13, 2025 09:49
@Turbo87 Turbo87 merged commit dab7125 into rust-lang:main Jun 13, 2025
10 checks passed
@Turbo87 Turbo87 deleted the status-snapshots branch June 13, 2025 09:51
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.

1 participant