framework

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToFrameworkScheme

func AddToFrameworkScheme(addToScheme addToSchemeFunc, obj runtime.Object) error

func MainEntry

func MainEntry(m *testing.M)

Types

type Framework

type Framework struct {
	KubeConfig     *rest.Config
	KubeClient     kubernetes.Interface
	Scheme         *runtime.Scheme
	DynamicClient  dynclient.Client
	DynamicDecoder runtime.Decoder
	ImageName      *string
}
var (

	// Global framework struct
	Global *Framework
)

func (*Framework) NewTestCtx

func (f *Framework) NewTestCtx(t *testing.T) TestCtx

type TestCtx

type TestCtx struct {
	ID         string
	CleanUpFns []finalizerFn
	Namespace  string
	CRClient   *rest.RESTClient
}

func (*TestCtx) AddFinalizerFn

func (ctx *TestCtx) AddFinalizerFn(fn finalizerFn)

func (*TestCtx) Cleanup

func (ctx *TestCtx) Cleanup(t *testing.T)

func (*TestCtx) CreateFromYAML

func (ctx *TestCtx) CreateFromYAML(yamlFile []byte) error

func (*TestCtx) GetCRClient

func (ctx *TestCtx) GetCRClient(yamlCR []byte) (*rest.RESTClient, error)

func (*TestCtx) GetID

func (ctx *TestCtx) GetID() string

func (*TestCtx) GetNamespace

func (ctx *TestCtx) GetNamespace() (string, error)

func (*TestCtx) GetObjID

func (ctx *TestCtx) GetObjID() string

GetObjID returns an ascending ID based on the length of cleanUpFns. It is based on the premise that every new object also appends a new finalizerFn on cleanUpFns.

Jump to

Keyboard shortcuts

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