envtest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 32 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 APIServerInstallOptions

type APIServerInstallOptions struct {
	Paths              []string
	ErrorIfPathMissing bool

	// 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 (*APIServerInstallOptions) ApplyAPIServices

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

func (*APIServerInstallOptions) ModifyAPIServiceDefinitions

func (o *APIServerInstallOptions) 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 (*APIServerInstallOptions) PrepWithoutInstalling

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

type APIServiceInstallOptions

type APIServiceInstallOptions struct {
	ClientCertDir string
	ClientCAData  []byte

	APIServerInstallOptions

	APIServers []APIServerInstallOptions
}

func (*APIServiceInstallOptions) AddAPIServerInstallOptions

func (o *APIServiceInstallOptions) AddAPIServerInstallOptions(opts APIServerInstallOptions) *APIServerInstallOptions

func (*APIServiceInstallOptions) AllAPIServerInstallOptions

func (o *APIServiceInstallOptions) AllAPIServerInstallOptions() []*APIServerInstallOptions

func (*APIServiceInstallOptions) Install

func (o *APIServiceInstallOptions) Install(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) AddAPIServerInstallOptions

func (e *EnvironmentExtensions) AddAPIServerInstallOptions(opts APIServerInstallOptions) *APIServerInstallOptions

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

Jump to

Keyboard shortcuts

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