cleanup(ndt7): remove redundant/unused code (#360)
This commit is contained in:
parent
f271e71c0b
commit
d4d1ac3832
|
@ -109,7 +109,7 @@ func (m *Measurer) doDownload(
|
||||||
callbacks model.ExperimentCallbacks, tk *TestKeys,
|
callbacks model.ExperimentCallbacks, tk *TestKeys,
|
||||||
URL string,
|
URL string,
|
||||||
) error {
|
) error {
|
||||||
if m.config.noDownload == true {
|
if m.config.noDownload {
|
||||||
return nil // useful to make tests faster
|
return nil // useful to make tests faster
|
||||||
}
|
}
|
||||||
conn, err := newDialManager(URL,
|
conn, err := newDialManager(URL,
|
||||||
|
@ -179,7 +179,7 @@ func (m *Measurer) doUpload(
|
||||||
callbacks model.ExperimentCallbacks, tk *TestKeys,
|
callbacks model.ExperimentCallbacks, tk *TestKeys,
|
||||||
URL string,
|
URL string,
|
||||||
) error {
|
) error {
|
||||||
if m.config.noUpload == true {
|
if m.config.noUpload {
|
||||||
return nil // useful to make tests faster
|
return nil // useful to make tests faster
|
||||||
}
|
}
|
||||||
conn, err := newDialManager(URL,
|
conn, err := newDialManager(URL,
|
||||||
|
|
|
@ -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) {
|
func TestDoDownloadWithCancelledContext(t *testing.T) {
|
||||||
m := new(Measurer)
|
m := new(Measurer)
|
||||||
sess := &mockable.Session{
|
sess := &mockable.Session{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user