Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestDebugLogger ¶
TestDebugLogger creates a test logger that outputs logs
Types ¶
type EtcdEntityServer ¶
type EtcdEntityServer struct {
Store *entity.EtcdStore
Server *entityserver.EntityServer
EAC *entityserver_v1alpha.EntityAccessClient
Client *apiserver.Client
Prefix string
// contains filtered or unexported fields
}
EtcdEntityServer provides an etcd-backed entity server for testing This enforces proper optimistic concurrency control unlike the in-memory version
func NewEtcdEntityServer ¶
func NewEtcdEntityServer(t *testing.T) (*EtcdEntityServer, func())
NewEtcdEntityServer creates a new etcd-backed entity server for testing It connects to etcd:2379 and uses a random prefix for isolation This should be run with ./hack/dev-exec or similar to have etcd available
type InMemEntityServer ¶
type InMemEntityServer struct {
Store *entity.MockStore
Server *entityserver.EntityServer
EAC *entityserver_v1alpha.EntityAccessClient
Client *apiserver.Client
}
InMemEntityServer provides an in-memory entity server for testing
func NewInMemEntityServer ¶
func NewInMemEntityServer(t *testing.T) (*InMemEntityServer, func())
NewInMemEntityServer creates a new in-memory entity server for testing
func (*InMemEntityServer) AddEntity ¶
func (s *InMemEntityServer) AddEntity(ent *entity.Entity)
AddEntity adds an entity to the mock store
Click to show internal directories.
Click to hide internal directories.