Help us shape the future of Go! Take the 2026 Go Developer Survey

testutils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ACLAnonymous

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

func ACLNoPermissions

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

func ACLOperatorRead

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

func ACLOperatorWrite

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

func ACLServiceRead

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

func ACLServiceWriteAny

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

func ACLsDisabled

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

func RunTestServer

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

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