diff options
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() |