MCPcopy
hub / github.com/dgraph-io/dgraph / TestRemoveNode

Function TestRemoveNode

dgraph/cmd/zero/zero_test.go:31–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29)
30
31func TestRemoveNode(t *testing.T) {
32 server := &Server{
33 state: &pb.MembershipState{
34 Groups: map[uint32]*pb.Group{1: {Members: map[uint64]*pb.Member{}}},
35 },
36 }
37 _, err := server.RemoveNode(context.TODO(), &pb.RemoveNodeRequest{NodeId: 3, GroupId: 1})
38 require.Error(t, err)
39 _, err = server.RemoveNode(context.TODO(), &pb.RemoveNodeRequest{NodeId: 1, GroupId: 2})
40 require.Error(t, err)
41}
42
43func TestIdLeaseOverflow(t *testing.T) {
44 dialOpts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}

Callers

nothing calls this directly

Calls 2

RemoveNodeMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected