From e714feba132d91acc409bbb6eb22ba1d8b6b9917 Mon Sep 17 00:00:00 2001 From: Andriy Biletsky Date: Thu, 19 Dec 2024 01:15:05 +0700 Subject: [PATCH] Fix metric handler test --- internal/metrics/{routes.go => handlers.go} | 0 internal/metrics/{routes_test.go => handlers_test.go} | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename internal/metrics/{routes.go => handlers.go} (100%) rename internal/metrics/{routes_test.go => handlers_test.go} (97%) diff --git a/internal/metrics/routes.go b/internal/metrics/handlers.go similarity index 100% rename from internal/metrics/routes.go rename to internal/metrics/handlers.go diff --git a/internal/metrics/routes_test.go b/internal/metrics/handlers_test.go similarity index 97% rename from internal/metrics/routes_test.go rename to internal/metrics/handlers_test.go index 6d4af432..602d4dfb 100644 --- a/internal/metrics/routes_test.go +++ b/internal/metrics/handlers_test.go @@ -24,7 +24,7 @@ func TestInvalidEvent(t *testing.T) { func TestInvalidMethod(t *testing.T) { rr := testMetricUIEvent(t, http.MethodGet, "", map[string]string{}) - assert.Equal(t, http.StatusMethodNotAllowed, rr.Code) + assert.Equal(t, http.StatusNotFound, rr.Code) } func TestTimeToStartEvent(t *testing.T) {