Skip to content

test: Improve SentryHttpStatusCodeRange tests#7678

Merged
philipphofmann merged 2 commits intomainfrom
test/improve-http-status-code-range-tests
Mar 12, 2026
Merged

test: Improve SentryHttpStatusCodeRange tests#7678
philipphofmann merged 2 commits intomainfrom
test/improve-http-status-code-range-tests

Conversation

@philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Mar 12, 2026

Summary

  • Add property verification tests for both initWithMin:max: and initWithStatusCode: to catch assignment bugs that isInRange alone might miss
  • Add boundary tests (min == max, inverted range) to cover conditional branches not exercised by the original mid-range and far-away values
  • Adopt test<Function>_when<Condition>_should<Expected> naming convention for self-documenting test names

#skip-changelog

Closes #7679

Add property verification, boundary, and edge case
coverage for both initializers and isInRange. Adopt
consistent naming convention.

Agent transcript: https://claudescope.sentry.dev/share/YUPkoCiAV9s9UjZNW-4gf7hvftpvcCTL6bhgviKQb8U
@philipphofmann philipphofmann added the ready-to-merge Use this label to trigger all PR workflows label Mar 12, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.896%. Comparing base (6f3e05f) to head (c47d449).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7678       +/-   ##
=============================================
+ Coverage   85.307%   85.896%   +0.589%     
=============================================
  Files          485       485               
  Lines        28837     28837               
  Branches     12521     12526        +5     
=============================================
+ Hits         24600     24770      +170     
+ Misses        4190      4019      -171     
- Partials        47        48        +1     

see 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f3e05f...c47d449. Read the comment docs.

Copy link
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

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

LGTM

@philipphofmann philipphofmann enabled auto-merge (squash) March 12, 2026 14:48
@philipphofmann philipphofmann merged commit 8d9e501 into main Mar 12, 2026
159 checks passed
@philipphofmann philipphofmann deleted the test/improve-http-status-code-range-tests branch March 12, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: Improve SentryHttpStatusCodeRange tests

2 participants