style(scrobble): rename unused r *http.Request to _ in client tests
Caught by revive's unused-parameter check. The four error-path tests don't read the request body, so the parameter is properly named _.
This commit is contained in:
@@ -55,7 +55,7 @@ func TestClient_SubmitListens_Success(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestClient_SubmitListens_401_ReturnsErrAuth(t *testing.T) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, r *http.Request) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
})
|
||||
defer srv.Close()
|
||||
@@ -66,7 +66,7 @@ func TestClient_SubmitListens_401_ReturnsErrAuth(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestClient_SubmitListens_400_ReturnsErrPermanent(t *testing.T) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, r *http.Request) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
})
|
||||
defer srv.Close()
|
||||
@@ -77,7 +77,7 @@ func TestClient_SubmitListens_400_ReturnsErrPermanent(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestClient_SubmitListens_503_ReturnsErrTransient(t *testing.T) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, r *http.Request) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.WriteHeader(http.StatusServiceUnavailable)
|
||||
})
|
||||
defer srv.Close()
|
||||
@@ -88,7 +88,7 @@ func TestClient_SubmitListens_503_ReturnsErrTransient(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestClient_SubmitListens_429_ReturnsRetryAfter(t *testing.T) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, r *http.Request) {
|
||||
c, srv := newTestClient(func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.Header().Set("Retry-After", "60")
|
||||
w.WriteHeader(http.StatusTooManyRequests)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user