framework

package
v0.0.0-...-6b9ae1e Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const NameSpace = "e2etest"

Variables

View Source
var AllFrames []EntryPoint
View Source
var QuickFrames []EntryPoint

Functions

func CreateOrUpdate

func CreateOrUpdate(
	client kubernetes.Interface,
	svc *v1.Service,
	mutate ServiceMutator,
) (*v1.Service, error)

func LoadConfig

func LoadConfig() (*restclient.Config, error)

func Mark

func Mark(
	label string,
	f EntryPoint,
) error

func NewAlibabaCloudOrDie

func NewAlibabaCloudOrDie(configpath string) *cloud.Cloud

func NewClientOrDie

func NewClientOrDie() kubernetes.Interface

func RegisterCommonFlags

func RegisterCommonFlags()

func RunNginxDeployment

func RunNginxDeployment(
	t *testing.T,
	client kubernetes.Interface,
) error

func ToPTR

func ToPTR(a []v1.Node) []*v1.Node

func ViperizeFlags

func ViperizeFlags()

ViperizeFlags sets up all flag and config processing. Future configuration info should be added to viper, not to flags.

func WaitServiceMutate

func WaitServiceMutate(
	client kubernetes.Interface,
	svc *v1.Service,
	mutate ServiceMutator,
) (*v1.Service, error)

func WaitTimeout

func WaitTimeout(
	test *testing.T,
	f *cloud.FrameWork,
	ExpectExistAndEqual func(f *cloud.FrameWork) error,
) error

Types

type Action

type Action interface {
	RunAction(f *FrameWorkE2E) error
}

func NewDefaultAction

func NewDefaultAction(u *TestUnit) Action

func NewRandomAction

func NewRandomAction(rand []Action) Action

type Config

type Config struct {
	Host                  string
	CloudConfig           string
	KubeConfig            string
	LoadBalancerID        string
	MasterZoneID          string
	SlaveZoneID           string
	BackendLabel          string
	AclID                 string
	VSwitchID             string
	CertID                string
	PrivateZoneID         string
	PrivateZoneName       string
	PrivateZoneRecordName string
	PrivateZoneRecordTTL  string
	TestLabel             string
}
var TestContext Config

type DefaultAction

type DefaultAction struct{ *TestUnit }

func (*DefaultAction) RunAction

func (u *DefaultAction) RunAction(f *FrameWorkE2E) error

type DeleteAction

type DeleteAction struct{ *TestUnit }

func NewDeleteAction

func NewDeleteAction(u *TestUnit) *DeleteAction

func (*DeleteAction) RunAction

func (u *DeleteAction) RunAction(f *FrameWorkE2E) error

type EntryPoint

type EntryPoint func(t *testing.T) error

type FrameWorkE2E

type FrameWorkE2E struct {
	InitService *v1.Service
	Test        *testing.T
	Desribe     string
	Log         Logger
	Client      kubernetes.Interface
}

FrameWorkE2E e2e framework

func NewFrameWork

func NewFrameWork(
	option OptionsFunc,
) *FrameWorkE2E

func (*FrameWorkE2E) Destroy

func (f *FrameWorkE2E) Destroy() error

func (*FrameWorkE2E) Logf

func (m *FrameWorkE2E) Logf(format string, args ...interface{})

func (*FrameWorkE2E) RunDefaultTest

func (f *FrameWorkE2E) RunDefaultTest(actions ...Action) error

func (*FrameWorkE2E) SetUp

func (f *FrameWorkE2E) SetUp() error

type Logger

type Logger struct {
}

type OptionsFunc

type OptionsFunc func(f *FrameWorkE2E)

type RandomAction

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

func (*RandomAction) RunAction

func (u *RandomAction) RunAction(f *FrameWorkE2E) error

type ServiceMutator

type ServiceMutator func(service *v1.Service) error

type TestUnit

type TestUnit struct {
	Description string
	Mutator     ServiceMutator
	//Service  *v1.Service
	ExpectOK func(f *cloud.FrameWork) error
}

Jump to

Keyboard shortcuts

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