Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Jul 4, 2024
1 parent e96c3d9 commit fc04bb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ linters-settings:

- github.com/google/uuid
- github.com/pkg/errors
- sigs.k8s.io/kind/pkg/errors
gci:
sections:
- standard
Expand Down
5 changes: 2 additions & 3 deletions test/e2e/docker_logcollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ func (k DockerLogCollector) collectLogsFromNode(ctx context.Context, outputPath
if err != nil {
return errors.Wrap(err, "Failed to collect logs from node")
}

execToPathFn := func(outputFileName, command string, args ...string) func() error {
return func() error {
f, err := fileOnHost(filepath.Join(outputPath, outputFileName))
Expand Down Expand Up @@ -147,7 +146,7 @@ func (k DockerLogCollector) collectLogsFromNode(ctx context.Context, outputPath
return err
}

return osExec.Command("tar", "--extract", "--file", tempfileName, "--directory", outputDir).Run() //nolint:gosec // We don't care about command injection here.
return osExec.Command("tar", "--extract", "--file", tempfileName, "--directory", outputDir).Run()
}
}
return errors.AggregateConcurrent([]func() error{
Expand Down Expand Up @@ -190,5 +189,5 @@ func fileOnHost(path string) (*os.File, error) {
if err := os.MkdirAll(filepath.Dir(path), os.ModePerm); err != nil {
return nil, err
}
return os.Create(path) //nolint:gosec // No security issue: path is safe.
return os.Create(path)
}

0 comments on commit fc04bb9

Please sign in to comment.