testutils

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2022 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTestServer

func RunTestServer(t *testing.T, services ...GRPCService) net.Addr

func TestAuthorizerAllowAll

func TestAuthorizerAllowAll(t *testing.T) resolver.Result

func TestAuthorizerDenyAll

func TestAuthorizerDenyAll(t *testing.T) resolver.Result

func TestAuthorizerServiceRead

func TestAuthorizerServiceRead(t *testing.T, serviceName string) resolver.Result

func TestAuthorizerServiceWriteAny

func TestAuthorizerServiceWriteAny(t *testing.T) resolver.Result

func TestStateStore

func TestStateStore(t *testing.T, publisher state.EventPublisher) *state.Store

Types

type FakeFSM

type FakeFSM struct {
	// contains filtered or unexported fields
}

func SetupFSMAndPublisher

func SetupFSMAndPublisher(t *testing.T, config FakeFSMConfig) (*FakeFSM, state.EventPublisher)

func (*FakeFSM) GetStore

func (f *FakeFSM) GetStore() *state.Store

func (*FakeFSM) ReplaceStore

func (f *FakeFSM) ReplaceStore(store *state.Store)

type FakeFSMConfig

type FakeFSMConfig struct {
	Register Registrar
	Refresh  []stream.Topic
	// contains filtered or unexported fields
}

type GRPCService

type GRPCService interface {
	Register(*grpc.Server)
}

type Registrar

type Registrar func(*FakeFSM, *stream.EventPublisher)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL