Skip to content

Commit

Permalink
Fix a lint error
Browse files Browse the repository at this point in the history
Related to #420
  • Loading branch information
enobufs committed Nov 18, 2024
1 parent 8e8bd06 commit 9f1dddb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/allocation/allocation_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"github.com/stretchr/testify/assert"
)

var errUnexpectedTestUsername = errors.New("unexpected user name")

func TestManager(t *testing.T) {
tt := []struct {
name string
Expand Down Expand Up @@ -182,7 +184,7 @@ func newTestManager(expectedUsername string) (*Manager, error) {
LeveledLogger: loggerFactory.NewLogger("test"),
AllocatePacketConn: func(_ string, _ int, username string) (net.PacketConn, net.Addr, error) {
if username != expectedUsername {
return nil, nil, errors.New("unexpected user name")
return nil, nil, errUnexpectedTestUsername
}
conn, err := net.ListenPacket("udp4", "0.0.0.0:0")
if err != nil {
Expand Down

0 comments on commit 9f1dddb

Please sign in to comment.