framework

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProject

func CreateProject(f *Framework, name string, labels map[string]string) (*v1.Namespace, error)

func CreateTestingNamespace

func CreateTestingNamespace(f *Framework, name string, labels map[string]string) (*v1.Namespace, error)

func CreateTestingProjectAndChangeUser

func CreateTestingProjectAndChangeUser(f *Framework, name string, labels map[string]string) (*v1.Namespace, error)

func DeleteNamespace

func DeleteNamespace(f *Framework, ns *v1.Namespace) error

func DumpEventsInNamespace

func DumpEventsInNamespace(c kubernetes.Interface, namespace string)

func Failf

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

func Logf

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

func Skipf

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

Types

type CreateTestingNSFn

type CreateTestingNSFn func(f *Framework, name string, labels map[string]string) (*v1.Namespace, error)

type DeleteTestingNSFn

type DeleteTestingNSFn func(f *Framework, ns *v1.Namespace) error

type DeleteTestingNSPolicyType

type DeleteTestingNSPolicyType string
var (
	DeleteTestingNSPolicyAlways    DeleteTestingNSPolicyType = "Always"
	DeleteTestingNSPolicyOnSuccess DeleteTestingNSPolicyType = "OnSuccess"
	DeleteTestingNSPolicyNever     DeleteTestingNSPolicyType = "Never"
)

type Framework

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

func NewFramework

func NewFramework(project string) *Framework

func (*Framework) AddNamespace

func (f *Framework) AddNamespace(namespace *v1.Namespace)

func (*Framework) AdminClientConfig

func (f *Framework) AdminClientConfig() *rest.Config

func (*Framework) AfterEach

func (f *Framework) AfterEach()

func (*Framework) BeforeEach

func (f *Framework) BeforeEach()

func (*Framework) ChangeUser

func (f *Framework) ChangeUser(username string, namespace string)

func (*Framework) ClientConfig

func (f *Framework) ClientConfig() *rest.Config

func (*Framework) CreateNamespace

func (f *Framework) CreateNamespace(name string, labels map[string]string) (*v1.Namespace, error)

func (*Framework) DeleteNamespace

func (f *Framework) DeleteNamespace(ns *v1.Namespace) error

func (*Framework) KubeAdminClientSet

func (f *Framework) KubeAdminClientSet() *kubernetes.Clientset

func (*Framework) KubeClientSet

func (f *Framework) KubeClientSet() *kubernetes.Clientset

func (*Framework) Namespace

func (f *Framework) Namespace() string

func (*Framework) OAuthClientset

func (f *Framework) OAuthClientset() oauthclientset.Interface

func (*Framework) ProjectClientset

func (f *Framework) ProjectClientset() projectclientset.Interface

func (*Framework) RouteClientset

func (f *Framework) RouteClientset() routeclientset.Interface

func (*Framework) UserClientset

func (f *Framework) UserClientset() userclientset.Interface

func (*Framework) Username

func (f *Framework) Username() string

type TestContextType

type TestContextType struct {
	KubeConfigPath        string
	CreateTestingNS       CreateTestingNSFn
	DeleteTestingNS       DeleteTestingNSFn
	DeleteTestingNSPolicy DeleteTestingNSPolicyType
}
var TestContext TestContextType

Jump to

Keyboard shortcuts

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