Skip to content

test(job artifact): simplify zip tests

Description

This MR simplifies zip tests in the job artifact command package. The issues found with the usetesting linter:

$ golangci-lint run
internal/commands/job/artifact/logic_test.go:110:24: os.TempDir() could be replaced by t.TempDir() in TestFileLimitExceeded (usetesting)
        err = readZip(reader, os.TempDir(), false, defaultZIPReadLimit, 50)
                              ^
internal/commands/job/artifact/logic_test.go:123:24: os.TempDir() could be replaced by t.TempDir() in TestReadLimitExceeded (usetesting)
        err = readZip(reader, os.TempDir(), false, 50, defaultZIPFileLimit)
                              ^
2 issues:
* usetesting: 2

How has this been tested?

Unit tests.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by Oleksandr Redko

Merge request reports

Loading