From 97f9a105479fd8c71999e17c8fb1f02e4768986c Mon Sep 17 00:00:00 2001 From: kevencript Date: Wed, 15 Mar 2023 11:09:24 -0300 Subject: [PATCH 1/2] test: :test_tube: Example changes on hashes to trigger the Sonarqube coverage --- main.go | 4 ++-- main_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 3362a1b..bb80eea 100644 --- a/main.go +++ b/main.go @@ -18,11 +18,11 @@ func main() { } func getFirstHash() string { - return "8743b52063cd84097a65d1633f5c74f5" + return "8743b52063cd84097a65d1633f5c74f6" } func getSecondHash() string { - return "0cc175b9c0f1b6a831c399e269772661" + return "0cc175b9c0f1b6a831c399e269772662" } func handlerFirstHash(w http.ResponseWriter, r *http.Request) { diff --git a/main_test.go b/main_test.go index e4f4448..4b641ba 100644 --- a/main_test.go +++ b/main_test.go @@ -53,7 +53,7 @@ func TestHandlerSecondHash(t *testing.T) { } func TestGetSecondHash(t *testing.T) { - expected := "0cc175b9c0f1b6a831c399e269772661" + expected := "0cc175b9c0f1b6a831c399e269772662" result := getSecondHash() if result != expected { t.Errorf("getSecondHash() failed, expected %s but got %s", expected, result) @@ -61,7 +61,7 @@ func TestGetSecondHash(t *testing.T) { } func TestGeFirstHash(t *testing.T) { - expected := "8743b52063cd84097a65d1633f5c74f5" + expected := "8743b52063cd84097a65d1633f5c74f6" result := getFirstHash() if result != expected { t.Errorf("getFirstHash() failed, expected %s but got %s", expected, result) From 2d7e0c4a91533ea66fcf142317955f40016e05e0 Mon Sep 17 00:00:00 2001 From: kevencript Date: Wed, 15 Mar 2023 12:00:58 -0300 Subject: [PATCH 2/2] test: :test_tube: Chaning the Hashes again (test) --- main.go | 4 ++-- main_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index bb80eea..dc08a05 100644 --- a/main.go +++ b/main.go @@ -18,11 +18,11 @@ func main() { } func getFirstHash() string { - return "8743b52063cd84097a65d1633f5c74f6" + return "8743b52063cd84097a65d1633f5c74f7" } func getSecondHash() string { - return "0cc175b9c0f1b6a831c399e269772662" + return "0cc175b9c0f1b6a831c399e269772663" } func handlerFirstHash(w http.ResponseWriter, r *http.Request) { diff --git a/main_test.go b/main_test.go index 4b641ba..b0eaf29 100644 --- a/main_test.go +++ b/main_test.go @@ -53,7 +53,7 @@ func TestHandlerSecondHash(t *testing.T) { } func TestGetSecondHash(t *testing.T) { - expected := "0cc175b9c0f1b6a831c399e269772662" + expected := "0cc175b9c0f1b6a831c399e269772663" result := getSecondHash() if result != expected { t.Errorf("getSecondHash() failed, expected %s but got %s", expected, result) @@ -61,7 +61,7 @@ func TestGetSecondHash(t *testing.T) { } func TestGeFirstHash(t *testing.T) { - expected := "8743b52063cd84097a65d1633f5c74f6" + expected := "8743b52063cd84097a65d1633f5c74f7" result := getFirstHash() if result != expected { t.Errorf("getFirstHash() failed, expected %s but got %s", expected, result)