refactor(engine): *http.Client -> model.HTTPClient (#836)
This diff makes the implementation of the engine package more abstract by changing HTTPClient() to return a model.HTTPClient as opposed to returning an *http.Client. Part of https://github.com/ooni/probe/issues/2184
This commit is contained in:
parent
d419ed8ac8
commit
6019b25baf
5 changed files with 10 additions and 9 deletions
|
|
@ -26,7 +26,11 @@ func TestSessionByteCounter(t *testing.T) {
|
|||
}
|
||||
s := newSessionForTesting(t)
|
||||
client := s.DefaultHTTPClient()
|
||||
resp, err := client.Get("https://www.google.com")
|
||||
req, err := http.NewRequest("GET", "https://www.google.com", nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue