Documentation ¶
Index ¶
- Constants
- Variables
- func CreateKubeNamespace(baseName string, c kubernetes.Interface) (*corev1.Namespace, error)
- func DeleteKubeNamespace(c kubernetes.Interface, namespace string) error
- func ExpectNoError(err error, explain ...interface{})
- func Failf(format string, args ...interface{})
- func LoadConfig(config, context string) (*rest.Config, error)
- func Logf(format string, args ...interface{})
- func RegisterCommonFlags()
- func RegisterParseFlags()
- func RemoveCleanupAction(p CleanupActionHandle)
- func RestclientConfig(config, context string) (*api.Config, error)
- func RunCleanupActions()
- func ServiceCatalogDescribe(text string, body func()) bool
- func Skipf(format string, args ...interface{})
- func WaitForEndpoint(c kubernetes.Interface, namespace, name string) error
- func WaitForPodRunningInNamespace(c kubernetes.Interface, pod *corev1.Pod) error
- type CleanupActionHandle
- type ClientConfigGetter
- type Framework
- type TestContextType
Constants ¶
const ( // How often to poll for conditions Poll = 2 * time.Second // Default time to wait for an endpoint to register EndpointRegisterTimeout = time.Minute )
const (
RecommendedConfigPathEnvVar = "SERVICECATALOGCONFIG"
)
Variables ¶
var RunId = uuid.NewUUID()
unique identifier of the e2e run
Functions ¶
func CreateKubeNamespace ¶
func DeleteKubeNamespace ¶
func DeleteKubeNamespace(c kubernetes.Interface, namespace string) error
func ExpectNoError ¶
func ExpectNoError(err error, explain ...interface{})
func RegisterParseFlags ¶
func RegisterParseFlags()
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 ServiceCatalogDescribe ¶
Wrapper function for ginkgo describe. Adds namespacing.
func WaitForEndpoint ¶ added in v0.0.22
func WaitForEndpoint(c kubernetes.Interface, namespace, name string) error
func WaitForPodRunningInNamespace ¶
func WaitForPodRunningInNamespace(c kubernetes.Interface, pod *corev1.Pod) error
Waits default amount of time (PodStartTimeout) for the specified pod to become running. Returns an error if timeout occurs first, or pod goes in to failed state.
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 ClientConfigGetter ¶
type Framework ¶
type Framework struct { BaseName string // A Kubernetes and Service Catalog client KubeClientSet kubernetes.Interface ServiceCatalogClientSet clientset.Interface // Namespace in which all test resources should reside Namespace *corev1.Namespace // contains filtered or unexported fields }
Framework supports common operations used by e2e tests; it will keep a client & a namespace for you.
func NewDefaultFramework ¶
NewFramework makes a new framework and sets up a BeforeEach/AfterEach for you (you can write additional before/after each functions).
func (*Framework) AfterEach ¶
func (f *Framework) AfterEach()
AfterEach deletes the namespace, after reading its events.
func (*Framework) BeforeEach ¶
func (f *Framework) BeforeEach()
BeforeEach gets a client and makes a namespace.
type TestContextType ¶
type TestContextType struct { KubeHost string KubeConfig string KubeContext string ServiceCatalogHost string ServiceCatalogConfig string ServiceCatalogContext string }
var TestContext TestContextType