From f2dce8f1996a53a147a8a48fb9cab894baa4ca2a Mon Sep 17 00:00:00 2001 From: Guangwen Feng Date: Sat, 30 May 2020 19:04:50 +0800 Subject: [PATCH] test: add unit test case for supernode_value.go Signed-off-by: Guangwen Feng --- dfget/config/supernode_value_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dfget/config/supernode_value_test.go b/dfget/config/supernode_value_test.go index c52e90fca..7226c69de 100644 --- a/dfget/config/supernode_value_test.go +++ b/dfget/config/supernode_value_test.go @@ -30,6 +30,11 @@ type SupernodeValueSuite struct { suite.Suite } +func (suit *SupernodeValueSuite) TestGetDefaultSupernodesValue() { + var expectedNodes = []*NodeWeight{{"127.0.0.1:8002", 1}} + suit.Equal(expectedNodes, GetDefaultSupernodesValue()) +} + func (suit *SupernodeValueSuite) TestHandleNodes() { var cases = []struct { nodeWithWeightList []string