mirror of
https://github.com/thegeeklab/wp-gitea-release.git
synced 2024-11-24 13:00:40 +00:00
test: use static errors
This commit is contained in:
parent
d88993d496
commit
750b60a81f
@ -94,9 +94,3 @@ run:
|
|||||||
linters-settings:
|
linters-settings:
|
||||||
gofumpt:
|
gofumpt:
|
||||||
extra-rules: true
|
extra-rules: true
|
||||||
|
|
||||||
issues:
|
|
||||||
exclude-rules:
|
|
||||||
- path: "_test.go"
|
|
||||||
linters:
|
|
||||||
- err113
|
|
||||||
|
@ -15,6 +15,8 @@ import (
|
|||||||
"github.com/thegeeklab/wp-gitea-release/gitea/mocks"
|
"github.com/thegeeklab/wp-gitea-release/gitea/mocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var ErrNoSuchFileOrDirectory = errors.New("no such file or directory")
|
||||||
|
|
||||||
func TestReleaseFind(t *testing.T) {
|
func TestReleaseFind(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
@ -256,7 +258,7 @@ func TestReleaseAddAttachments(t *testing.T) {
|
|||||||
FileExists: "overwrite",
|
FileExists: "overwrite",
|
||||||
},
|
},
|
||||||
files: []string{"testdata/file1.txt", "testdata/invalid.txt"},
|
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