No test coverage for ipaddr in HTTP.start
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- backend, testing-qa
Research direction
Start at the HTTP.start entry point and trace how its ipaddr argument reaches the request connection. Add test coverage demonstrating that the supplied ipaddr is used, then run the relevant HTTP.start tests and confirm the behavior remains covered in future changes.
Written by the indexing model from the issue text.
Description
We use a code like this:
request = Net::HTTP::Get.new(uri.request_uri)
Net::HTTP.start(uri.hostname, uri.port, ipaddr: ip, use_ssl: true) do |http|
http.request(request)
end
What I have noticed is that it is difficult to see if ipaddr is actually used for the request... If there is a change in the future the ipaddr param may be just ignored and nobody will notice.
Furthermore I have noticed that in the code of this gem there is no test coverage for the ipaddr parameter passed to HTTP.start.
- Is there a more "solid" and "future-proof" solution to set the ipaddr in the above code?
- Can you add test coverage for this parameter so that it won't break in future versions?
- Dominant language
- Ruby
- Stars
- 148
- Forks
- 95
- Avg merge
- 10h 54m
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/net-http
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bensheldon/good_job#1816 · 5 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·