fix(oohelper): make sure the CI is green (#282)
* chore(oohelper): increase tests verbosity Hopefully this helps with https://github.com/ooni/probe/issues/1409. * fix(oohelper): use a nonstandard resolver * fix previous * make the diff pleasant/committable/correct
This commit is contained in:
parent
2ca9496c04
commit
51459e23b2
|
@ -24,9 +24,21 @@ var (
|
|||
target = flag.String("target", "", "Target URL for the test helper")
|
||||
)
|
||||
|
||||
func newhttpclient() *http.Client {
|
||||
// Use a nonstandard resolver, which is enough to work around the
|
||||
// puzzling https://github.com/ooni/probe/issues/1409 issue.
|
||||
childResolver, err := netx.NewDNSClient(
|
||||
netx.Config{Logger: log.Log}, "dot://8.8.8.8:853")
|
||||
runtimex.PanicOnError(err, "netx.NewDNSClient should not fail here")
|
||||
txp := netx.NewHTTPTransport(netx.Config{
|
||||
BaseResolver: childResolver,
|
||||
Logger: log.Log,
|
||||
})
|
||||
return &http.Client{Transport: txp}
|
||||
}
|
||||
|
||||
func init() {
|
||||
txp := netx.NewHTTPTransport(netx.Config{Logger: log.Log})
|
||||
httpClient = &http.Client{Transport: txp}
|
||||
httpClient = newhttpclient()
|
||||
resolver = netx.NewResolver(netx.Config{Logger: log.Log})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user