Documentation ¶
Index ¶
- Variables
- func Cleanup(contexts ...*Context)
- func CleanupAll()
- func CleanupOnInterrupt(t *testing.T, cleanup CleanupFunc)
- func CreateSubscription(ctx *Context, subscriptionName string, packageName string) (*v1alpha1.Subscription, error)
- func IsCSVSucceeded(c *v1alpha1.ClusterServiceVersion, err error) (bool, error)
- func IsSubscriptionInstalledCSVPresent(s *v1alpha1.Subscription, err error) (bool, error)
- func Subscription(subscriptionName string, packageName string) *v1alpha1.Subscription
- func WaitForClusterServiceVersionState(ctx *Context, name, namespace string, ...) (*v1alpha1.ClusterServiceVersion, error)
- func WaitForSubscriptionState(ctx *Context, name, namespace string, ...) (*v1alpha1.Subscription, error)
- func WithOperatorReady(ctx *Context, subscriptionName string, packageName string) (*v1alpha1.Subscription, error)
- type CleanupFunc
- type Clients
- type Context
Constants ¶
This section is empty.
Variables ¶
View Source
var Kubeconfigs = calculate()
View Source
var PerformCleanup = func(t *testing.T) bool { return true }
Functions ¶
func CleanupOnInterrupt ¶
func CleanupOnInterrupt(t *testing.T, cleanup CleanupFunc)
CleanupOnInterrupt will execute the function cleanup if an interrupt signal is caught
func CreateSubscription ¶
func IsCSVSucceeded ¶
func IsCSVSucceeded(c *v1alpha1.ClusterServiceVersion, err error) (bool, error)
func IsSubscriptionInstalledCSVPresent ¶
func IsSubscriptionInstalledCSVPresent(s *v1alpha1.Subscription, err error) (bool, error)
func Subscription ¶
func Subscription(subscriptionName string, packageName string) *v1alpha1.Subscription
func WaitForClusterServiceVersionState ¶
func WaitForClusterServiceVersionState(ctx *Context, name, namespace string, inState func(s *v1alpha1.ClusterServiceVersion, err error) (bool, error)) (*v1alpha1.ClusterServiceVersion, error)
func WaitForSubscriptionState ¶
func WaitForSubscriptionState(ctx *Context, name, namespace string, inState func(s *v1alpha1.Subscription, err error) (bool, error)) (*v1alpha1.Subscription, error)
func WithOperatorReady ¶
Types ¶
type CleanupFunc ¶
type CleanupFunc func() error
CleanupFunc defines a function that is called when the respective resource should be deleted. When creating resources the user should also create a CleanupFunc and register with the Context
type Clients ¶
type Clients struct { KubeClient *test.KubeClient Dynamic dynamic.Interface Config *rest.Config OLM olmversioned.Interface Apps *k8sv1.AppsV1Client }
Clients holds instances of interfaces for making requests
type Context ¶
type Context struct { Name string T *testing.T Clients *Clients CleanupList []CleanupFunc }
Context holds objects related to test execution
func (*Context) AddToCleanup ¶
func (ctx *Context) AddToCleanup(f CleanupFunc)
AddToCleanup adds the cleanup function as the first function to the cleanup list, we want to delete the last thing first
Click to show internal directories.
Click to hide internal directories.