MockPeer is a mock cluster.Peer used for testing.
| 27 | |
| 28 | // MockPeer is a mock cluster.Peer used for testing. |
| 29 | type MockPeer struct { |
| 30 | NameFunc func() string |
| 31 | ConnFunc func() (*grpc.ClientConn, error) |
| 32 | HasRoleFunc func(ttnpb.ClusterRole) bool |
| 33 | RolesFunc func() []ttnpb.ClusterRole |
| 34 | TagsFunc func() map[string]string |
| 35 | } |
| 36 | |
| 37 | // Name calls NameFunc if set and panics otherwise. |
| 38 | func (m MockPeer) Name() string { |
nothing calls this directly
no outgoing calls
no test coverage detected