runner

package
v0.0.0-...-1b19c93 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapTestRegistry

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

ConfigMapTestRegistry allows to store information about passed tests in a config map

func NewConfigMapTestRegistry

func NewConfigMapTestRegistry(k8s kubernetes.Interface, namespace, name string) (*ConfigMapTestRegistry, error)

func (*ConfigMapTestRegistry) IsTestPassed

func (r *ConfigMapTestRegistry) IsTestPassed(name string) bool

func (*ConfigMapTestRegistry) MarkTestPassed

func (r *ConfigMapTestRegistry) MarkTestPassed(name string) error

type NamespaceCreator

type NamespaceCreator interface {
	Create(*v1.Namespace) (*v1.Namespace, error)
}

NamespaceCreator has methods required to create k8s ns.

type TestRegistry

type TestRegistry interface {
	IsTestPassed(name string) bool
	MarkTestPassed(name string) error
}

type TestRunner

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

TestRunner executes registered tests

func NewTestRunner

func NewTestRunner(log *logrus.Entry, nsCreator NamespaceCreator, testRegistry TestRegistry, tests map[string]UpgradeTest, maxConcurrencyLevel int, verbose bool) (*TestRunner, error)

NewTestRunner is a constructor for TestRunner

func (*TestRunner) ExecuteTests

func (r *TestRunner) ExecuteTests(stopCh <-chan struct{}) error

ExecuteTests executes TestResources method for each registered test. Test are run in parallel with given maxConcurrencyLevel

func (*TestRunner) PrepareData

func (r *TestRunner) PrepareData(stopCh <-chan struct{}) error

PrepareData executes CreateResources method for each registered test. Test are run in parallel with given maxConcurrencyLevel

type UpgradeTest

type UpgradeTest interface {
	CreateResources(stop <-chan struct{}, log logrus.FieldLogger, namespace string) error
	TestResources(stop <-chan struct{}, log logrus.FieldLogger, namespace string) error
}

UpgradeTest allows to execute test in a generic way

Jump to

Keyboard shortcuts

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