Skip to content

Commit

Permalink
lint: minor warns in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Sep 20, 2023
1 parent b090bb4 commit f37072e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/proxy/cache_control_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

func TestCacheControl_MiddlewareDefault(t *testing.T) {
req := httptest.NewRequest("GET", "/file.html", nil)
req := httptest.NewRequest("GET", "/file.html", http.NoBody)
w := httptest.NewRecorder()

h := NewCacheControl(time.Hour).Middleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -26,7 +26,7 @@ func TestCacheControl_MiddlewareDefault(t *testing.T) {
}

func TestCacheControl_MiddlewareDisabled(t *testing.T) {
req := httptest.NewRequest("GET", "/file.html", nil)
req := httptest.NewRequest("GET", "/file.html", http.NoBody)
w := httptest.NewRecorder()

h := NewCacheControl(0).Middleware(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -48,7 +48,7 @@ func TestCacheControl_MiddlewareMime(t *testing.T) {
}))

{
req := httptest.NewRequest("GET", "/file.html", nil)
req := httptest.NewRequest("GET", "/file.html", http.NoBody)
w := httptest.NewRecorder()
h.ServeHTTP(w, req)
resp := w.Result()
Expand All @@ -57,7 +57,7 @@ func TestCacheControl_MiddlewareMime(t *testing.T) {
}

{
req := httptest.NewRequest("GET", "/xyz/file.png?something=blah", nil)
req := httptest.NewRequest("GET", "/xyz/file.png?something=blah", http.NoBody)
w := httptest.NewRecorder()
h.ServeHTTP(w, req)
resp := w.Result()
Expand All @@ -66,7 +66,7 @@ func TestCacheControl_MiddlewareMime(t *testing.T) {
}

{
req := httptest.NewRequest("GET", "/xyz/file.gif?something=blah", nil)
req := httptest.NewRequest("GET", "/xyz/file.gif?something=blah", http.NoBody)
w := httptest.NewRecorder()
h.ServeHTTP(w, req)
resp := w.Result()
Expand All @@ -75,7 +75,7 @@ func TestCacheControl_MiddlewareMime(t *testing.T) {
}

{
req := httptest.NewRequest("GET", "/xyz/", nil)
req := httptest.NewRequest("GET", "/xyz/", http.NoBody)
w := httptest.NewRecorder()
h.ServeHTTP(w, req)
resp := w.Result()
Expand Down

0 comments on commit f37072e

Please sign in to comment.