Skip to content

Commit

Permalink
Use os.Open instead of os.ReadFile.
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscovalentecastro committed Jan 5, 2024
1 parent bc749ec commit 93b40c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions integration_test/ops_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ AGENT_PACKAGES_IN_GCS: If provided, a URL for a directory in GCS containing
package integration_test

import (
"bytes"
"context"
"embed"
"encoding/json"
Expand Down Expand Up @@ -4713,11 +4712,11 @@ func TestPartialSuccess(t *testing.T) {
pipelines:
p1:
receivers: [files_1]`, logPath)
testFile, err := os.ReadFile(path.Join("testdata", "partial_success", "test.log"))
testFile, err := os.Open(path.Join("testdata", "partial_success", "test.log"))
if err != nil {
t.Fatal(err)
}
if err = gce.UploadContent(ctx, logger, vm, bytes.NewReader(testFile), logPath); err != nil {
if err = gce.UploadContent(ctx, logger, vm, testFile, logPath); err != nil {
t.Fatal(err)
}
if err = agents.SetupOpsAgent(ctx, logger, vm, config); err != nil {
Expand Down

0 comments on commit 93b40c4

Please sign in to comment.