framework

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//default network for cni configure
	DefaultNet string = "10.30.0.0/16"
)

Functions

func ClearAllImages

func ClearAllImages(client internalapi.ImageManagerService)

func CniWork

func CniWork(podNetworkStatus *kubeapi.PodSandboxNetworkStatus) bool

func ExpectNoError

func ExpectNoError(err error, explain ...interface{})

func Failf

func Failf(format string, args ...interface{})

func KubeDescribe

func KubeDescribe(text string, body func()) bool

func Logf

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

func NewUUID

func NewUUID() string

func PodFound

func PodFound(podsandboxs []*kubeapi.PodSandbox, podId string) bool

podFound returns whether podsandbox is found

func PodReady

func PodReady(status *kubeapi.PodSandboxStatus) bool

podReady returns whether podsandbox state is ready.

func RegisterCommonFlags

func RegisterCommonFlags()

Register flags common to all e2e test suites.

func RegisterFraktiFlags

func RegisterFraktiFlags()

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.

func SkipUnlessAtLeast

func SkipUnlessAtLeast(value int, minValue int, message string)

func Skipf

func Skipf(format string, args ...interface{})

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 FraktiClient

type FraktiClient struct {
	FraktiRuntimeService internalapi.RuntimeService
	FraktiImageService   internalapi.ImageManagerService
}

func LoadDefaultClient

func LoadDefaultClient() (*FraktiClient, error)

type Framework

type Framework struct {
	BaseName string

	Client *FraktiClient
	// contains filtered or unexported fields
}

Framework supports common operations used by e2e tests; it will keep a client & a namespace for you. Eventual goal is to merge this with integration test framework.

func NewDefaultFramework

func NewDefaultFramework(baseName string) *Framework

NewFramework makes a new framework and sets up a BeforeEach/AfterEach for you (you can write additional before/after each functions).

func NewFramework

func NewFramework(baseName string, client *FraktiClient) *Framework

func (*Framework) AfterEach

func (f *Framework) AfterEach()

AfterEach clean resources

func (*Framework) BeforeEach

func (f *Framework) BeforeEach()

BeforeEach gets a client

type TestContextType

type TestContextType struct {
	ImageServiceAddr      string
	ImageServiceTimeout   time.Duration
	RuntimeServiceAddr    string
	RuntimeServiceTimeout time.Duration
	ReportPrefix          string
	ReportDir             string
}
var TestContext TestContextType

type TestDataSummary

type TestDataSummary interface {
	PrintHumanReadable() string
	PrintJSON() string
}

Jump to

Keyboard shortcuts

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