From 5709fbda87defe995c2575325486c07c9ba49139 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 00:22:23 +0000 Subject: [PATCH 1/2] Bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5 Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.4 to 1.20.5. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.20.4...v1.20.5) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index baf6a18..009f510 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/gorilla/handlers v1.5.2 github.com/julienschmidt/httprouter v1.3.0 github.com/justinas/alice v1.2.0 - github.com/prometheus/client_golang v1.20.4 + github.com/prometheus/client_golang v1.20.5 github.com/prometheus/common v0.59.1 // indirect github.com/rs/xid v1.6.0 github.com/rs/zerolog v1.33.0 diff --git a/go.sum b/go.sum index 7f60fd1..325a3c6 100644 --- a/go.sum +++ b/go.sum @@ -100,8 +100,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= From ea1820c12729dc8ac33b58bf6f762d3a7848714d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Mald=C3=A9m=C3=A9?= Date: Tue, 5 Nov 2024 13:09:13 +0100 Subject: [PATCH 2/2] Fix e2e json response --- .e2e/gotest/e2e_test.go | 2 +- .e2e/gotest/metrics_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.e2e/gotest/e2e_test.go b/.e2e/gotest/e2e_test.go index dc795f6..538ffee 100644 --- a/.e2e/gotest/e2e_test.go +++ b/.e2e/gotest/e2e_test.go @@ -59,7 +59,7 @@ func TestE2E(t *testing.T) { name: "valid path - " + *baseUrl + "/rest/v1/2.2.2.2", url: "" + *baseUrl + "/rest/v1/2.2.2.2", method: "GET", - want: []byte(`{"ip":"2.2.2.2","country_code":"FR","country_name":"France","city":"Paris","latitude":48.8566,"longitude":2.35222}`), + want: []byte(`{"ip":"2.2.2.2","country_code":"FR","country_name":"France","city":"Issy-les-Moulineaux","latitude":48.8309,"longitude":2.26582}`), code: http.StatusOK, }, { diff --git a/.e2e/gotest/metrics_test.go b/.e2e/gotest/metrics_test.go index ae01e22..d8c91df 100644 --- a/.e2e/gotest/metrics_test.go +++ b/.e2e/gotest/metrics_test.go @@ -26,7 +26,7 @@ func parseMF(r io.Reader) (map[string]*dto.MetricFamily, error) { func populateMetrics() error { requests := []struct { ip string - }{{ip: "1.1.1.1"},{ip: "2.2.2.2"},{ip: "3.3.3.3"},{ip: "4.4.4.4"},{ip: "5.5.5.5"},{ip: "6.6.6.6"},} + }{{ip: "1.1.1.1"}, {ip: "2.2.2.2"}, {ip: "3.3.3.3"}, {ip: "4.4.4.4"}, {ip: "5.5.5.5"}, {ip: "6.6.6.6"}} client := &http.Client{Timeout: 5 * time.Second} @@ -48,7 +48,7 @@ func populateMetrics() error { func TestWithMetricsEnabled(t *testing.T) { err := populateMetrics() if err != nil { - t.Fatalf(err.Error()) + t.Fatal(err.Error()) } client := &http.Client{Timeout: 5 * time.Second} @@ -77,7 +77,7 @@ func TestWithMetricsEnabled(t *testing.T) { data = append(data, '\n') mf, err := parseMF(bytes.NewReader(data)) if err != nil { - t.Fatalf(err.Error()) + t.Fatal(err.Error()) } assert.NoError(t, err)