Skip to content

Commit

Permalink
refactor: improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
adjivas committed Feb 25, 2025
1 parent 6ef0236 commit ca85ce3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require (
github.com/google/uuid v1.3.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.8.3
github.com/urfave/cli v1.22.5
gopkg.in/yaml.v2 v2.4.0
)
Expand All @@ -21,6 +22,7 @@ require (
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
Expand All @@ -38,6 +40,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/tim-ywliu/nested-logrus-formatter v1.3.2 // indirect
Expand Down
2 changes: 2 additions & 0 deletions internal/utils/net_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net

import (
"github.com/stretchr/testify/assert"
"net/netip"
"testing"
)
Expand All @@ -15,6 +16,7 @@ func TestRegisterAddrWithLocalhost(t *testing.T) {
if addr != expected_addr {
t.Errorf("invalid IP: %+v", addr)
}
assert.Equal(t, addr, expected_addr)
}

func TestRegisterAddrWithIpV4(t *testing.T) {
Expand Down

0 comments on commit ca85ce3

Please sign in to comment.