Cleanup httpgetter_test.go

Just a small cleanup in the httpgetter_test.go. Remove dead code
that can never be reached (ok is always true if a basic auth exists)

Signed-off-by: Felix Becker <git@felixbecker.name>
pull/10616/head
Felix Becker 4 years ago
parent 59dbda915f
commit 9e8f8b2821

@ -208,8 +208,8 @@ func TestDownload(t *testing.T) {
// test with Get URL differing from withURL // test with Get URL differing from withURL
crossAuthSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { crossAuthSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
username, password, ok := r.BasicAuth() username, password, ok := r.BasicAuth()
if ok || username == "username" || password == "password" { if ok {
t.Errorf("Expected request to not include but got '%v', '%s', '%s'", ok, username, password) t.Errorf("Expected no basic auth in request but got user '%s' and password '%s'", username, password)
} }
fmt.Fprint(w, expect) fmt.Fprint(w, expect)
})) }))

Loading…
Cancel
Save