diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:41:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:41:39 +0000 |
commit | fcfb5e62f95d625836328131cc5ca851182bcae4 (patch) | |
tree | 5309ef2284a82d61ece838d1dd1c97c09df152b8 /tests/history_test.go | |
parent | Adding upstream version 1.1.1. (diff) | |
download | icingadb-6ee3f6d80af8d7d56be5d07c1977df9f7da6f0ec.tar.xz icingadb-6ee3f6d80af8d7d56be5d07c1977df9f7da6f0ec.zip |
Adding upstream version 1.2.0.upstream/1.2.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/history_test.go')
-rw-r--r-- | tests/history_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/history_test.go b/tests/history_test.go index e720f02..8590bc3 100644 --- a/tests/history_test.go +++ b/tests/history_test.go @@ -6,16 +6,16 @@ import ( _ "embed" "encoding/json" "fmt" - "github.com/go-redis/redis/v8" "github.com/icinga/icinga-testing/services" "github.com/icinga/icinga-testing/utils" "github.com/icinga/icinga-testing/utils/eventually" "github.com/icinga/icinga-testing/utils/pki" "github.com/jmoiron/sqlx" + "github.com/redis/go-redis/v9" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap" - "io/ioutil" + "io" "math" "net/http" "sort" @@ -143,7 +143,7 @@ func testHistory(t *testing.T, numNodes int) { }, 15*time.Second, 200*time.Millisecond) db, err := sqlx.Connect(rdb.Driver(), rdb.DSN()) - require.NoError(t, err, "connecting to mysql") + require.NoError(t, err, "connecting to database") t.Cleanup(func() { _ = db.Close() }) client := nodes[0].IcingaClient @@ -717,7 +717,7 @@ func processCheckResult(t *testing.T, client *utils.Icinga2Client, hostname stri response, err := client.PostJson("/v1/actions/process-check-result", bytes.NewBuffer(reqBody)) require.NoError(t, err, "process-check-result") if !assert.Equal(t, 200, response.StatusCode, "process-check-result") { - body, err := ioutil.ReadAll(response.Body) + body, err := io.ReadAll(response.Body) require.NoError(t, err, "reading process-check-result response") it.Logger(t).Error("process-check-result", zap.ByteString("api-response", body)) t.FailNow() |