integration

package
v0.0.0-...-db62745 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 27 Imported by: ? modules, 0 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.

README

Integration Tests

This suite is testing Eirini with a real K8s cluster. For that, it expects the path to a valid kubeconfig file as INTEGRATION_KUBECONFIG environment variable. If INTEGRATION_KUBECONFIG is not provided, this will default to ~/.kube/config.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfigFile

func CreateConfigFile(config interface{}) (*os.File, error)

func CreateEmptySecret

func CreateEmptySecret(namespace, secretName string, clientset kubernetes.Interface) error

func CreateSecretWithStringData

func CreateSecretWithStringData(namespace, secretName string, clientset kubernetes.Interface, stringData map[string]string) error

func CreateTestServer

func CreateTestServer(certPath, keyPath, caCertPath string) (*ghttp.Server, error)

func DefaultAPIConfig

func DefaultAPIConfig(namespace string, tlsPort int) *eirini.APIConfig

func DefaultControllerConfig

func DefaultControllerConfig(namespace string) *eirini.ControllerConfig

func GetPDB

func GetPDB(clientset kubernetes.Interface, namespace, lrpGUID, lrpVersion string) policyv1.PodDisruptionBudget

func GetPDBItems

func GetPDBItems(clientset kubernetes.Interface, namespace, lrpGUID, lrpVersion string) ([]policyv1.PodDisruptionBudget, error)

func GetRegistrySecretName

func GetRegistrySecretName(clientset kubernetes.Interface, namespace, taskGUID, secretName string) string

func GetStatefulSet

func GetStatefulSet(clientset kubernetes.Interface, namespace, guid, version string) *appsv1.StatefulSet

func GetTaskJobConditions

func GetTaskJobConditions(clientset kubernetes.Interface, namespace, taskGUID string) func() []batchv1.JobCondition

func ListJobs

func ListJobs(clientset kubernetes.Interface, namespace, taskGUID string) func() []batchv1.Job

func MakeTestHTTPClient

func MakeTestHTTPClient(certsPath string) (*http.Client, error)

Types

type Binary

type Binary struct {
	PackagePath string `json:"src_path"`
	BinPath     string `json:"bin_path"`
	LocksDir    string `json:"locks_dir"`
	CertsPath   string `json:"cert_path"`
}

func NewBinary

func NewBinary(packagePath, binsPath string, certsPath string) Binary

func (*Binary) Build

func (b *Binary) Build()

Build builds the binary. Normally, you should not use this function as it is built if needed upon first run anyway. However, sometimes it might make sense to explicitly build a common binary that is used across all the tests in SynchronizedBeforeSuite thus preventing running the build on concurrent nodes.

For example, EATs tests will always run API, therefore it is a good idea to build it in advance.

func (*Binary) Restart

func (b *Binary) Restart(configFilePath string, runningSession *gexec.Session) *gexec.Session

func (*Binary) Run

func (b *Binary) Run(config interface{}, envVars ...string) (*gexec.Session, string)

func (*Binary) RunWithConfig

func (b *Binary) RunWithConfig(configFilePath string, envVars ...string) *gexec.Session

type EiriniBinaries

type EiriniBinaries struct {
	API                      Binary `json:"api"`
	EventsReporter           Binary `json:"events_reporter"`
	TaskReporter             Binary `json:"task_reporter"`
	EiriniController         Binary `json:"eirini_controller"`
	InstanceIndexEnvInjector Binary `json:"instance_index_env_injector"`
	Migration                Binary `json:"migration"`
	ResourceValidator        Binary `json:"resource_validator"`
	ExternalBinsPath         bool
	BinsPath                 string
	CertsPath                string
}

func NewEiriniBinaries

func NewEiriniBinaries() EiriniBinaries

func (*EiriniBinaries) TearDown

func (b *EiriniBinaries) TearDown()

Directories

Path Synopsis
assets
notdora command

Jump to

Keyboard shortcuts

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