From 194d071d483e76478709e8c13a97f05e2d8afb97 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Mon, 25 Mar 2024 08:55:16 +0100 Subject: [PATCH] Apply lint suggestions --- filebeat/tests/integration/store_test.go | 2 -- libbeat/tests/integration/framework.go | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/filebeat/tests/integration/store_test.go b/filebeat/tests/integration/store_test.go index 66c0b14d2e80..c3ddb1ca759c 100644 --- a/filebeat/tests/integration/store_test.go +++ b/filebeat/tests/integration/store_test.go @@ -81,10 +81,8 @@ func TestStore(t *testing.T) { t.Fatalf("could not create logs folder '%s': %s", logsFolder, err) } - logFiles := []string{} for i := 0; i < numLogFiles; i++ { logFile := path.Join(logsFolder, fmt.Sprintf("log-%d.log", i)) - logFiles = append(logFiles, logFile) integration.GenerateLogFile(t, logFile, 10, false) } logsFolderGlob := filepath.Join(logsFolder, "*") diff --git a/libbeat/tests/integration/framework.go b/libbeat/tests/integration/framework.go index 0f26a2e13399..6017c63fd872 100644 --- a/libbeat/tests/integration/framework.go +++ b/libbeat/tests/integration/framework.go @@ -26,7 +26,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "net/http" "net/url" "os" @@ -525,7 +524,7 @@ func (b *BeatProc) LoadMeta() (Meta, error) { } defer metaFile.Close() - metaBytes, err := ioutil.ReadAll(metaFile) + metaBytes, err := io.ReadAll(metaFile) require.NoError(b.t, err, "error reading meta file") err = json.Unmarshal(metaBytes, &m) require.NoError(b.t, err, "error unmarshalling meta data")