From bba50692b3d58517570a572fd3e53764513ca4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 25 Oct 2024 16:53:08 +0800 Subject: [PATCH] fix: test --- pkg/tools/tools_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/tools/tools_test.go b/pkg/tools/tools_test.go index cc8a4333..ee9b0b05 100644 --- a/pkg/tools/tools_test.go +++ b/pkg/tools/tools_test.go @@ -20,7 +20,7 @@ func (s *HelperTestSuite) TestGetMonitoringInfo() { func (s *HelperTestSuite) TestGetPublicIPv4() { ip, err := GetPublicIPv4() - s.Nil(err) + s.NoError(err) s.NotEmpty(ip) } @@ -32,12 +32,12 @@ func (s *HelperTestSuite) TestGetPublicIPv6() { func (s *HelperTestSuite) TestGetLocalIPv4() { ip, err := GetLocalIPv4() - s.Nil(err) + s.NoError(err) s.NotEmpty(ip) } func (s *HelperTestSuite) TestGetLocalIPv6() { ip, err := GetLocalIPv6() - s.Nil(err) - s.NotEmpty(ip) + s.Error(err) + s.Empty(ip) }