0
0
mirror of https://github.com/thegeeklab/wp-gitea-release.git synced 2024-11-21 13:50:40 +00:00

test: use static errors

This commit is contained in:
Robert Kaussow 2024-05-12 11:01:08 +02:00
parent d88993d496
commit 750b60a81f
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 3 additions and 7 deletions

View File

@ -94,9 +94,3 @@ run:
linters-settings:
gofumpt:
extra-rules: true
issues:
exclude-rules:
- path: "_test.go"
linters:
- err113

View File

@ -15,6 +15,8 @@ import (
"github.com/thegeeklab/wp-gitea-release/gitea/mocks"
)
var ErrNoSuchFileOrDirectory = errors.New("no such file or directory")
func TestReleaseFind(t *testing.T) {
tests := []struct {
name string
@ -256,7 +258,7 @@ func TestReleaseAddAttachments(t *testing.T) {
FileExists: "overwrite",
},
files: []string{"testdata/file1.txt", "testdata/invalid.txt"},
wantErr: errors.New("no such file or directory"),
wantErr: ErrNoSuchFileOrDirectory,
},
}