Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 354163b

Browse files
author
Guangwen Feng
committed
test: add unit test case for hashcircler_locator.go
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
1 parent f372031 commit 354163b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dfget/locator/hashcircler_locator_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ func (s *hashCirclerLocatorTestSuite) TestHashCirclerLocator(c *check.C) {
4141

4242
c.Assert(hl.Get(), check.IsNil)
4343
c.Assert(hl.Next(), check.IsNil)
44+
c.Assert(hl.GetGroup("nonexistentName"), check.IsNil)
45+
c.Assert(hl.GetGroup(testGroupName1).Name, check.Equals, testGroupName1)
46+
c.Assert(hl.Size(), check.Equals, len(nodes))
47+
c.Assert(hl.Refresh(), check.Equals, true)
4448

4549
groups := hl.All()
4650
c.Assert(len(groups), check.Equals, 1)

0 commit comments

Comments
 (0)