test(job artifact): simplify zip tests
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
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