Repository navigation
Feat(cuex): allow HEAD in the vela/http provider - #159
Conversation
3e4f1c9 to
2e317c7
Compare
There was a problem hiding this comment.
All reported issues were addressed
Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.
View guided diff | Re-trigger cubic
Signed-off-by: Marcus Beauregard <marcus.beauregard.developer@gmail.com>
2e317c7 to
2b032b0
Compare
|
Good catch — the header was set up but never checked, so the test would have passed even if HEAD dropped the headers. Added the missing assertion in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
=======================================
Coverage 92.55% 92.55%
=======================================
Files 115 115
Lines 6944 6944
=======================================
Hits 6427 6427
Misses 517 517
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Fixes #158.
Adds HEAD to the method enum in cue/cuex/providers/http/http.cue, plus a #Head helper next to the existing #Get/#Post/#Trace ones so a template can ask for a headers-only request without spelling the method out. Do already passes the method straight to http.NewRequestWithContext, so no Go change was needed.
The new TestDoHeadRequest compiles a template through the provider package against an httptest.Server, then asserts the method the server actually saw, the 200 status, and that the returned body is empty.
Verification (go1.27.1):
gofmt clean. If you'd rather keep the diff to the enum and the test only, I'll drop the #Head helper — it's there for symmetry with the other methods.
(The change and test were drafted with AI assistance; I ran the package tests locally before opening.)