From bf04a84c414431961f39cb5030dc8bb513ca8e39 Mon Sep 17 00:00:00 2001 From: Delyan Raychev Date: Thu, 18 Feb 2021 18:31:37 -0800 Subject: [PATCH] pkg/endpoint: Increase unit test coverage Signed-off-by: Delyan Raychev --- pkg/endpoint/endpoint_test.go | 17 +++++++++++++++++ pkg/endpoint/suite_test.go | 13 ------------- 2 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 pkg/endpoint/endpoint_test.go delete mode 100644 pkg/endpoint/suite_test.go diff --git a/pkg/endpoint/endpoint_test.go b/pkg/endpoint/endpoint_test.go new file mode 100644 index 0000000000..b01823d282 --- /dev/null +++ b/pkg/endpoint/endpoint_test.go @@ -0,0 +1,17 @@ +package endpoint + +import ( + "net" + "testing" + + tassert "github.com/stretchr/testify/assert" +) + +func Test(t *testing.T) { + assert := tassert.New(t) + ept := Endpoint{ + IP: net.ParseIP("9.9.9.9"), + Port: 1234, + } + assert.Equal(ept.String(), "(ip=9.9.9.9, port=1234)") +} diff --git a/pkg/endpoint/suite_test.go b/pkg/endpoint/suite_test.go deleted file mode 100644 index 16f0810d8a..0000000000 --- a/pkg/endpoint/suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package endpoint - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestEndpoints(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Endpoints Test Suite") -}