Skip to content
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

refactor: minor tweaks to /drip implementation #185

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Conversation

mccutchen
Copy link
Owner

A handful of drive-by tweaks to the /drip implementation:

  • Update docs to clarify intended uses (a helpful reminder for myself, if nothing else)
  • Ensure all bad requests use standard JSON error responses
  • Switch from binary to text content type

This also includes a small fix to the internal testing library, dropping the assert.RoughDuration() helper in favor of an updated generic assert.RoughlyEqual() implementation that works with the time.Duration type.

httpbin/handlers.go Dismissed Show dismissed Hide dismissed
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.13%. Comparing base (24529f4) to head (5574709).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
- Coverage   95.13%   95.13%   -0.01%     
==========================================
  Files          10       10              
  Lines        1726     1725       -1     
==========================================
- Hits         1642     1641       -1     
  Misses         48       48              
  Partials       36       36              
Files with missing lines Coverage Δ
httpbin/handlers.go 99.21% <100.00%> (-0.01%) ⬇️

@mccutchen mccutchen merged commit dc8fb20 into main Sep 17, 2024
7 checks passed
@mccutchen mccutchen deleted the drip-fixups branch September 17, 2024 03:49
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.

1 participant