diff --git a/Makefile b/Makefile index 8551818..988f603 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,4 @@ clean: rm -rf ./bin test: go clean -testcache - go test -v ./... \ No newline at end of file + go test ./... \ No newline at end of file diff --git a/api/main_test.go b/api/main_test.go index 63e926c..1200f58 100644 --- a/api/main_test.go +++ b/api/main_test.go @@ -182,6 +182,7 @@ func TestHealth(t *testing.T) { } func TestGetFavicon(t *testing.T) { + etg := "042fcec4629b02c73aa21a3d26ca8965" r := setupRouter() w := httptest.NewRecorder() @@ -212,8 +213,8 @@ func TestGetFavicon(t *testing.T) { t.Errorf("incorrect Cache-Control, got %q, want%q\n", headers.Get("Cache-Control"), "public, max-age=31536000") t.FailNow() } - if headers.Get("ETag") != "d6ab255e0eb3f7ce86dcb0ba12992a67" { - t.Errorf("incorrect ETag, got %q, want %q\n", headers.Get("ETag"), "d6ab255e0eb3f7ce86dcb0ba12992a67") + if headers.Get("ETag") != etg { + t.Errorf("incorrect ETag, got %q, want %q\n", headers.Get("ETag"), etg) t.FailNow() } @@ -232,14 +233,14 @@ func TestGetFavicon(t *testing.T) { t.Errorf("incorrect Cache-Control, got %q, want %q\n", headers.Get("Cache-Control"), "public, max-age=31536000") t.FailNow() } - if headers.Get("ETag") != "d6ab255e0eb3f7ce86dcb0ba12992a67" { - t.Errorf("incorrect ETag, got %q, want %q\n", headers.Get("ETag"), "d6ab255e0eb3f7ce86dcb0ba12992a67") + if headers.Get("ETag") != etg { + t.Errorf("incorrect ETag, got %q, want %q\n", headers.Get("ETag"), etg) t.FailNow() } w = httptest.NewRecorder() req, _ = http.NewRequest("GET", "/favicon.ico", nil) - req.Header.Add("If-None-Match", "d6ab255e0eb3f7ce86dcb0ba12992a67") + req.Header.Add("If-None-Match", etg) r.ServeHTTP(w, req) if w.Code != http.StatusNotModified {