MCPcopy
hub / github.com/CodisLabs/codis / TestGroupCreate

Function TestGroupCreate

pkg/topom/topom_group_test.go:21–36  ·  view source on GitHub ↗
(x *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestGroupCreate(x *testing.T) {
22 t := openTopom()
23 defer t.Close()
24
25 assert.Must(t.CreateGroup(0) != nil)
26 assert.Must(t.CreateGroup(-1) != nil)
27 assert.Must(t.CreateGroup(10000) != nil)
28
29 assert.MustNoError(t.CreateGroup(1))
30 assert.Must(t.CreateGroup(1) != nil)
31
32 g := getGroup(t, 1)
33 assert.Must(g.Id == 1)
34 assert.Must(g.Promoting.State == models.ActionNothing)
35 assert.Must(len(g.Servers) == 0)
36}
37
38func TestGroupRemove(x *testing.T) {
39 t := openTopom()

Callers

nothing calls this directly

Calls 4

openTopomFunction · 0.85
getGroupFunction · 0.85
CloseMethod · 0.65
CreateGroupMethod · 0.45

Tested by

no test coverage detected