0
0
mirror of https://github.com/thegeeklab/wp-github-comment.git synced 2024-11-24 13:00:41 +00:00

test: use static errors

This commit is contained in:
Robert Kaussow 2024-05-12 10:59:19 +02:00
parent 6ddf49beb4
commit 96d603d111
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 3 additions and 7 deletions

View File

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

View File

@ -12,6 +12,8 @@ import (
"github.com/thegeeklab/wp-github-comment/github/mocks" "github.com/thegeeklab/wp-github-comment/github/mocks"
) )
var ErrInternalServerError = errors.New("internal server error")
func TestGithubIssue_FindComment(t *testing.T) { func TestGithubIssue_FindComment(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
@ -156,7 +158,7 @@ func TestGithubIssue_AddComment(t *testing.T) {
Message: "test message", Message: "test message",
Update: false, Update: false,
}, },
wantErr: errors.New("internal server error"), wantErr: ErrInternalServerError,
}, },
} }