From e21dfc7e8f9ccdb1bd09c76c604fd9b3f88425d3 Mon Sep 17 00:00:00 2001 From: Fabrizio Sestito Date: Sun, 19 Dec 2021 21:11:24 +0100 Subject: [PATCH 1/2] Update test --- web/checks_api_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/checks_api_test.go b/web/checks_api_test.go index c6765e053..206814592 100644 --- a/web/checks_api_test.go +++ b/web/checks_api_test.go @@ -235,7 +235,7 @@ func TestApiCreateChecksCatalogHandler(t *testing.T) { func TestApiCheckGetSettingsByIdHandler(t *testing.T) { mockClustersService := new(services.MockClustersService) - mockClustersService.On("GetClusterSettingsByID", "a615a35f65627be5a757319a0741127f").Return(&models.ClusterSettings{ + mockClustersService.On("GetClusterSettingsByID", "cluster_id").Return(&models.ClusterSettings{ SelectedChecks: []string{"ABCDEF", "123456"}, Hosts: []*models.HostConnection{ { @@ -257,7 +257,7 @@ func TestApiCheckGetSettingsByIdHandler(t *testing.T) { assert.NoError(t, err) resp := httptest.NewRecorder() - req, err := http.NewRequest("GET", "/api/checks/a615a35f65627be5a757319a0741127f/settings", nil) + req, err := http.NewRequest("GET", "/api/checks/cluster_id/settings", nil) assert.NoError(t, err) app.webEngine.ServeHTTP(resp, req) From 54b0c7f3036d958e9c487cc2b730b6544bee2b04 Mon Sep 17 00:00:00 2001 From: Fabrizio Sestito Date: Sun, 19 Dec 2021 21:13:21 +0100 Subject: [PATCH 2/2] Bump gin gonic version --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 5f4f40b4f..676613b8a 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/StackExchange/wmi v1.2.1 // indirect github.com/gin-contrib/sessions v0.0.3 - github.com/gin-gonic/gin v1.7.0 + github.com/gin-gonic/gin v1.7.7 github.com/go-openapi/jsonreference v0.19.6 // indirect github.com/go-openapi/swag v0.19.15 // indirect github.com/gomarkdown/markdown v0.0.0-20210514010506-3b9f47219fe7 diff --git a/go.sum b/go.sum index 7fa5165d5..9ece39a76 100644 --- a/go.sum +++ b/go.sum @@ -115,6 +115,8 @@ github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6 github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= +github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs= +github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=