import "v.io/x/ref/lib/discovery/testutil"
Package testutil defines helpers for discovery tests.
func Advertise(ctx *context.T, d discovery.T, visibility []security.BlessingPattern, ads ...*discovery.Advertisement) (func(), error)
func ScanAndMatch(ctx *context.T, d discovery.T, query string, wants ...discovery.Advertisement) error
WithPrincipal creates a new principal with an extension of the default blessing of the principal in the returned context.
WithPrivateKey creates a new principal with the provided blessing and stores the private key of the blessing in the returned context.
type MockServer struct {
// contains filtered or unexported fields
}
func NewMockServer(eps []naming.Endpoint) *MockServer
func (s *MockServer) AddName(string) error
func (s *MockServer) Closed() <-chan struct{}
func (s *MockServer) RemoveName(string)
func (s *MockServer) Status() rpc.ServerStatus
func (s *MockServer) UpdateNetwork(eps []naming.Endpoint)
Package testutil imports 16 packages (graph). Updated 2020-10-22. Refresh now. Tools for package owners.