test

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 74 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestDataFS embed.FS

Functions

func LoadPlugins

func LoadPlugins(loader *plugins.PluginLoader) int

func NewApiExtensionTestPlugin

func NewApiExtensionTestPlugin(
	srv apiextensions.ManagementAPIExtensionServer,
	svcDesc *grpc.ServiceDesc,
	impl interface{},
) *plugin.ClientConfig

func NewTestClusterStore

func NewTestClusterStore(ctrl *gomock.Controller) storage.ClusterStore

func NewTestKeyValueStore

func NewTestKeyValueStore(ctrl *gomock.Controller) storage.KeyValueStore

func NewTestKeyValueStoreBroker

func NewTestKeyValueStoreBroker(ctrl *gomock.Controller) storage.KeyValueStoreBroker

func NewTestKeyringStore

func NewTestKeyringStore(ctrl *gomock.Controller, prefix string, ref *core.Reference) storage.KeyringStore

func NewTestKeyringStoreBroker

func NewTestKeyringStoreBroker(ctrl *gomock.Controller) storage.KeyringStoreBroker

func NewTestRBACStore

func NewTestRBACStore(ctrl *gomock.Controller) storage.RBACStore

func NewTestStorageBackend

func NewTestStorageBackend(ctx context.Context, ctrl *gomock.Controller) storage.Backend

func NewTestTokenStore

func NewTestTokenStore(ctx context.Context, ctrl *gomock.Controller) storage.TokenStore

func StartStandaloneTestEnvironment

func StartStandaloneTestEnvironment()

func TestData

func TestData(filename string) []byte

Types

type Environment

type Environment struct {
	TestBin           string
	Logger            *zap.SugaredLogger
	CRDDirectoryPaths []string
	// contains filtered or unexported fields
}

func (*Environment) EtcdClient

func (e *Environment) EtcdClient() (*clientv3.Client, error)

func (*Environment) GatewayConfig

func (e *Environment) GatewayConfig() *v1beta1.GatewayConfig

func (*Environment) GatewayTLSConfig

func (e *Environment) GatewayTLSConfig() *tls.Config

func (*Environment) GetAgent

func (e *Environment) GetAgent(id string) RunningAgent

func (*Environment) NewManagementClient

func (e *Environment) NewManagementClient() management.ManagementClient

func (*Environment) PrometheusAPIEndpoint

func (e *Environment) PrometheusAPIEndpoint() string

func (*Environment) Start

func (e *Environment) Start() error

func (*Environment) StartAgent

func (e *Environment) StartAgent(id string, token *core.BootstrapToken, pins []string, opts ...StartAgentOption) (int, <-chan error)

func (*Environment) StartK8s

func (e *Environment) StartK8s() (*rest.Config, error)

func (*Environment) StartManager

func (e *Environment) StartManager(restConfig *rest.Config, reconcilers ...Reconciler) ctrl.Manager

func (*Environment) StartPrometheus

func (e *Environment) StartPrometheus(opniAgentPort int) int

func (*Environment) Stop

func (e *Environment) Stop() error

type Lease

type Lease struct {
	ID         int64
	Expiration time.Time
	TokenID    string
}

type LeaseStore

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

func NewLeaseStore

func NewLeaseStore(ctx context.Context) *LeaseStore

func (*LeaseStore) LeaseExpired

func (ls *LeaseStore) LeaseExpired() <-chan string

func (*LeaseStore) New

func (ls *LeaseStore) New(tokenID string, ttl time.Duration) *Lease

type Reconciler

type Reconciler interface {
	SetupWithManager(ctrl.Manager) error
}

type RunningAgent

type RunningAgent struct {
	*agent.Agent
	*sync.Mutex
}

type StartAgentOption

type StartAgentOption func(*StartAgentOptions)

func WithContext

func WithContext(ctx context.Context) StartAgentOption

type StartAgentOptions

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

func (*StartAgentOptions) Apply

func (o *StartAgentOptions) Apply(opts ...StartAgentOption)

Directories

Path Synopsis
mock
apiextensions
Package mock_apiextensions is a generated GoMock package.
Package mock_apiextensions is a generated GoMock package.
capability
Package mock_capability is a generated GoMock package.
Package mock_capability is a generated GoMock package.
ext
Package mock_ext is a generated GoMock package.
Package mock_ext is a generated GoMock package.
ident
Package mock_ident is a generated GoMock package.
Package mock_ident is a generated GoMock package.
rbac
Package mock_rbac is a generated GoMock package.
Package mock_rbac is a generated GoMock package.
storage
Package mock_storage is a generated GoMock package.
Package mock_storage is a generated GoMock package.

Jump to

Keyboard shortcuts

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