FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test(updateclihttp): add request header assertion and test cases by ak95asb · Pull Request #7815 · updatecli/updatecli · GitHub

test(updateclihttp): add request header assertion and test cases - #7815

Open
ak95asb wants to merge 8 commits into
updatecli:mainfrom
ak95asb:fix/updateclihttp-source-test-check-headers
Open

test(updateclihttp): add request header assertion and test cases#7815
ak95asb wants to merge 8 commits into
updatecli:mainfrom
ak95asb:fix/updateclihttp-source-test-check-headers

Conversation

ak95asb commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves the // TODO: check headers comment in source_test.go:140.

The mock's DoFunc now iterates over tt.spec.Request.Headers and
returns an error if any header on the outgoing request doesn't match
the spec — ensuring headers set via spec.request.headers are actually
forwarded on the wire.

Two new table-driven test cases added:

  • "Normal case with single request header" (Authorization)
  • "Normal case with multiple request headers" (Authorization + X-Custom-Header)

Test plan

  • go test ./pkg/plugins/resources/updateclihttp/... -run TestSource — all 8 cases pass

ak95asb and others added 2 commits February 23, 2026 17:05
Resolve a TODO at source_test.go to verify that custom HTTP request
headers specified via spec.request.headers are actually forwarded on
the wire. The mock's DoFunc now iterates over tt.spec.Request.Headers
and fails the test if the header value on the outgoing request does
not match the spec.

Two new table-driven test cases are added:
- "Normal case with single request header" (Authorization)
- "Normal case with multiple request headers" (Authorization + X-Custom-Header)

ak95asb commented Feb 24, 2026

Copy link
Copy Markdown
Contributor Author

Hi @olblak, I am new to Go and open source development in general.
Please guide me on what I am supposed to do next. Or if I am just shooting in the dark here.
Thanks.

ak95asb closed this Feb 25, 2026

olblak commented Feb 25, 2026

Copy link
Copy Markdown
Member

Hi @ak95asb,
You need to be patient :)

olblak reopened this Feb 25, 2026

ak95asb commented Feb 25, 2026

Copy link
Copy Markdown
Contributor Author

Hi @olblak,
My bad. So sorry.
Thanks again for the hand holding.
:)

olblak added the chore label Mar 1, 2026
olblak enabled auto-merge (squash) March 2, 2026 06:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL