You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am about to replace httpx with httpclientx (as implemented in ooni/probe-cli#1560) for the ./internal/oonirunv2 package. Before doing this, I would like to review the implementation and the tests to make sure we have adequate testing and that it's clear what we're doing and why we're doing it. The target files are v2.go and v2_test.go.
This work is part of more comprehensive work described by #2700.
The text was updated successfully, but these errors were encountered:
It seems we're already covering these cases with tests, while using a real localhost HTTP server:
common case where we fetch and execute a descriptor
case where we fetch it but cannot update the cache
case where we fetch it but there's no permission to automerge changes
case where the server returns a literal "null"
case where the server returns a descriptor with an empty test name
I do not think the job of the oonirun package would be to test its underlying HTTP library. That sad, because I am changing the underlying library, and for robustness, it won't certainly hurt to add:
case where the connection is RST when attempting to fetch a descriptor
case where the JSON does not parse
Since adding these new test cases would be quick, I think it makes sense since it adds a bit of robustness.
bassosimone
changed the title
oonirunv2: document and review implementation and tests
oonirun(v2.go): document and review implementation and tests
Apr 24, 2024
I am about to replace
httpx
withhttpclientx
(as implemented in ooni/probe-cli#1560) for the./internal/oonirunv2
package. Before doing this, I would like to review the implementation and the tests to make sure we have adequate testing and that it's clear what we're doing and why we're doing it. The target files arev2.go
andv2_test.go
.This work is part of more comprehensive work described by #2700.
The text was updated successfully, but these errors were encountered: