cleanup(ndt7): remove redundant/unused code (#360)

This commit is contained in:
Simone Basso 2021-06-04 17:44:13 +02:00 committed by GitHub
parent f271e71c0b
commit d4d1ac3832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 13 deletions

View File

@ -109,7 +109,7 @@ func (m *Measurer) doDownload(
callbacks model.ExperimentCallbacks, tk *TestKeys,
URL string,
) error {
if m.config.noDownload == true {
if m.config.noDownload {
return nil // useful to make tests faster
}
conn, err := newDialManager(URL,
@ -179,7 +179,7 @@ func (m *Measurer) doUpload(
callbacks model.ExperimentCallbacks, tk *TestKeys,
URL string,
) error {
if m.config.noUpload == true {
if m.config.noUpload {
return nil // useful to make tests faster
}
conn, err := newDialManager(URL,

View File

@ -40,17 +40,6 @@ func TestDiscoverCancelledContext(t *testing.T) {
}
}
type verifyRequestTransport struct {
ExpectedError error
}
func (txp *verifyRequestTransport) RoundTrip(req *http.Request) (*http.Response, error) {
if req.URL.RawQuery != "ip=1.2.3.4" {
return nil, errors.New("invalid req.URL.RawQuery")
}
return nil, txp.ExpectedError
}
func TestDoDownloadWithCancelledContext(t *testing.T) {
m := new(Measurer)
sess := &mockable.Session{