envtest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartWithExtensions

func StartWithExtensions(env *envtest.Environment, ext *EnvironmentExtensions) (*rest.Config, error)

func StopWithExtensions

func StopWithExtensions(env *envtest.Environment, ext *EnvironmentExtensions) error

func WaitUntilAPIServicesAvailable

func WaitUntilAPIServicesAvailable(ctx context.Context, c client.Client, services ...*apiregistrationv1.APIService) error

func WaitUntilAPIServicesReady

func WaitUntilAPIServicesReady(ctx context.Context, ext *EnvironmentExtensions, c client.Client, scheme *runtime.Scheme) error

func WaitUntilAPIServicesReadyWithTimeout

func WaitUntilAPIServicesReadyWithTimeout(timeout time.Duration, ext *EnvironmentExtensions, c client.Client, scheme *runtime.Scheme) error

func WaitUntilGroupVersionsDiscoverable

func WaitUntilGroupVersionsDiscoverable(ctx context.Context, c client.Client, scheme *runtime.Scheme, gvs ...schema.GroupVersion) error

func WaitUntilGroupVersionsDiscoverableWithTimeout

func WaitUntilGroupVersionsDiscoverableWithTimeout(timeout time.Duration, c client.Client, scheme *runtime.Scheme, gvs ...schema.GroupVersion) error

func WaitUntilTypesDiscoverable

func WaitUntilTypesDiscoverable(ctx context.Context, c client.Client, objs ...client.Object) error

func WaitUntilTypesDiscoverableWithTimeout

func WaitUntilTypesDiscoverableWithTimeout(timeout time.Duration, c client.Client, objs ...client.Object) error

Types

type APIServiceInstallOptions

type APIServiceInstallOptions struct {
	Paths              []string
	ErrorIfPathMissing bool

	ClientCertDir string
	ClientCAData  []byte

	// LocalServingCertDir is the allocated directory for serving certificates.
	// it will be automatically populated by the local temp dir
	LocalServingCertDir string

	LocalServingPort int

	LocalServingHost             string
	LocalServingHostExternalName string
	LocalServingCAData           []byte

	APIServices []*apiregistrationv1.APIService

	ServiceNamespace string
	ServiceName      string
}

func (*APIServiceInstallOptions) ApplyAPIServices

func (o *APIServiceInstallOptions) ApplyAPIServices(cfg *rest.Config) error

func (*APIServiceInstallOptions) Install

func (o *APIServiceInstallOptions) Install(cfg *rest.Config) error

func (*APIServiceInstallOptions) ModifyAPIServiceDefinitions

func (o *APIServiceInstallOptions) ModifyAPIServiceDefinitions(cfg *rest.Config) error

ModifyAPIServiceDefinitions modifies APIService definitions by: - applying CABundle based on the provided tinyca - applying service based on the created service

func (*APIServiceInstallOptions) PrepWithoutInstalling

func (o *APIServiceInstallOptions) PrepWithoutInstalling(cfg *rest.Config) error

func (*APIServiceInstallOptions) SetupClientCA

func (o *APIServiceInstallOptions) SetupClientCA() error

func (*APIServiceInstallOptions) Stop

func (o *APIServiceInstallOptions) Stop() error

type AdditionalService

type AdditionalService struct {
	Name string
	Host string
	Port int
}

type EnvironmentExtensions

type EnvironmentExtensions struct {
	APIServiceInstallOptions APIServiceInstallOptions
	APIServices              []*apiregistrationv1.APIService

	// APIServiceDirectoryPaths is a list of paths containing APIService yaml or json configs.
	// If both this field and Paths field in APIServiceInstallOptions are specified, the
	// values are merged.
	APIServiceDirectoryPaths []string

	ErrorIfAPIServicePathIsMissing bool

	AdditionalServices []AdditionalService
}

func (*EnvironmentExtensions) GetAdditionalServiceHost

func (e *EnvironmentExtensions) GetAdditionalServiceHost(name string) string

func (*EnvironmentExtensions) GetAdditionalServiceHostPort

func (e *EnvironmentExtensions) GetAdditionalServiceHostPort(name string) (string, int)

func (*EnvironmentExtensions) GetAdditionalServicePort

func (e *EnvironmentExtensions) GetAdditionalServicePort(name string) int

Directories

Path Synopsis
internal
testing/flock
Package flock is copied from k8s.io/kubernetes/pkg/util/flock to avoid importing k8s.io/kubernetes as a dependency.
Package flock is copied from k8s.io/kubernetes/pkg/util/flock to avoid importing k8s.io/kubernetes as a dependency.

Jump to

Keyboard shortcuts

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