framework

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveCleanupAction

func RemoveCleanupAction(p CleanupActionHandle)

RemoveCleanupAction removes a function that was installed by AddCleanupAction.

func RunCleanupActions

func RunCleanupActions()

RunCleanupActions runs all functions installed by AddCleanupAction. It does not remove them (see RemoveCleanupAction) but it does run unlocked, so they may remove themselves.

Types

type CleanupActionHandle

type CleanupActionHandle *int

func AddCleanupAction

func AddCleanupAction(fn func()) CleanupActionHandle

AddCleanupAction installs a function that will be called in the event of the whole test being terminated. This allows arbitrary pieces of the overall test to hook into SynchronizedAfterSuite().

type Framework

type Framework struct {
	ClientSet       clientset.Interface
	Cloud           cloud.Cloud
	ResourceManager *resource.Manager
	Config          *rest.Config // TODO delete me

	Options Options
	// contains filtered or unexported fields
}

TODO(@M00nF1sh): migrate to use k8s test framework when it's isolated without pulling in all dependencies. This is an simplified version of k8s test framework, since some dependencies don't work under go module :(. Framework supports common operations used by e2e tests; it will keep a client & a namespace for you.

func New

func New() *Framework

New makes a new framework and sets up a BeforeEach/AfterEach for you.

func (*Framework) AfterEach

func (f *Framework) AfterEach()

TODO

func (*Framework) BeforeEach

func (f *Framework) BeforeEach()

TODO

type Options

type Options struct {
	KubeConfig  string
	ClusterName string
	AWSRegion   string
	AWSVPCID    string
}

func (*Options) BindFlags

func (options *Options) BindFlags()

func (*Options) Validate

func (options *Options) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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