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:
parent
d88993d496
commit
750b60a81f
@ -94,9 +94,3 @@ run:
|
||||
linters-settings:
|
||||
gofumpt:
|
||||
extra-rules: true
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: "_test.go"
|
||||
linters:
|
||||
- err113
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user