harness

package
v2.0.0-...-26fc5fb Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsNotFound types.GomegaMatcher = WithTransform(errors.IsNotFound, BeTrue())
View Source
var SucceedOrAlreadyExist types.GomegaMatcher = SatisfyAny(
	Succeed(),
	WithTransform(errors.IsAlreadyExists, BeTrue()),
)

Functions

func GetCommand

func GetCommand(cmd string, args ...string) *exec.Cmd

func GetRootDirectory

func GetRootDirectory() (string, error)

func PodFailHandler

func PodFailHandler(testHarness *TestHarness) func(message string, callerSkip ...int)

Types

type TestHarness

type TestHarness struct {
	client.Client
	reconcileutils.ClientCommandRunner

	Config TestHarnessOptions
	// contains filtered or unexported fields
}

func NewTestHarness

func NewTestHarness(
	options TestHarnessOptions,
) (*TestHarness, error)

func (*TestHarness) Start

func (t *TestHarness) Start() (context.Context, error)

func (*TestHarness) Stop

func (t *TestHarness) Stop() error

func (*TestHarness) Upsert

func (t *TestHarness) Upsert(ctx context.Context, obj client.Object) error

type TestHarnessOptions

type TestHarnessOptions struct {
	EnabledFeatures []string `env:"FEATURES" envSeparator:"," envDefault:"all"`
	Namespace       string   `env:"NAMESPACE" envDefault:"openshift-redhat-marketplace"`
	WatchNamespace  string   `env:"WATCH_NAMESPACE" envDefault:""`

	ProvideScheme func(cfg *rest.Config) (*runtime.Scheme, error)
}

Jump to

Keyboard shortcuts

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