Enable usetesting linter

Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
This commit is contained in:
Oleksandr Redko committed 2025-04-24 17:35:13 +03:00
1 parent ef25b90148
commit 01b435a426
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -26,6 +26,7 @@ linters:
- revive
- staticcheck
- unused
- usetesting
- whitespace
settings:
depguard:
@@ -119,6 +120,8 @@ linters:
- -ST1000
- -ST1001 # duplicates revive.dot-imports
- -ST1022
usetesting:
os-temp-dir: true
exclusions:
presets:
- common-false-positives
+1 -1
View File
@@ -148,7 +148,7 @@ func TestFillDefault(t *testing.T) {
Mounts: []Mount{
// Location will be passed through localpathutil.Expand() which will normalize the name
// (add a drive letter). So we must start with a valid local path to match it again later.
{Location: filepath.Clean(os.TempDir())},
{Location: filepath.Clean(t.TempDir())},
{Location: "{{.Dir}}/{{.Param.ONE}}", MountPoint: ptr.Of("/mnt/{{.Param.ONE}}")},
},
MountType: ptr.Of(NINEP),