Documentation ¶
Index ¶
- func CreateNamespaceOrDie(ctx context.Context, tContext TestContext, name string) error
- func CreateObject(tContext TestContext, obj client.Object, async bool, delay time.Duration) client.Object
- func DeleteInNs(tContext TestContext, obj client.Object, async bool)
- func DeleteObject(tContext TestContext, obj client.Object, async bool)
- func GetObject(tContext TestContext, obj client.Object) func() client.Object
- func GetStatusMessage(tContext TestContext, comp *v1alpha1.Composable) func() string
- func GetStatusState(tContext TestContext, comp *v1alpha1.Composable) func() string
- func GetUnstructuredObject(tContext TestContext, namespacedname types.NamespacedName, ...) func() error
- func LoadComposable(filename string) v1alpha1.Composable
- func LoadObject(filename string, obj client.Object) client.Object
- func PostInNs(tContext TestContext, obj client.Object, async bool, delay time.Duration) client.Object
- func UpdateObject(tContext TestContext, obj client.Object, async bool, delay time.Duration) client.Object
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNamespaceOrDie ¶
func CreateNamespaceOrDie(ctx context.Context, tContext TestContext, name string) error
CreateNamespaceOrDie creates a new namespace
func CreateObject ¶
func CreateObject(tContext TestContext, obj client.Object, async bool, delay time.Duration) client.Object
Creates the object
func DeleteInNs ¶
func DeleteInNs(tContext TestContext, obj client.Object, async bool)
DeletInNs the object
func DeleteObject ¶
func DeleteObject(tContext TestContext, obj client.Object, async bool)
DeleteObject deletes an object
func GetObject ¶
func GetObject(tContext TestContext, obj client.Object) func() client.Object
GetObject gets the object from the store
func GetStatusMessage ¶
func GetStatusMessage(tContext TestContext, comp *v1alpha1.Composable) func() string
GetStatusMessage returns the status message of a Composable object
func GetStatusState ¶
func GetStatusState(tContext TestContext, comp *v1alpha1.Composable) func() string
GetStatusState returns the status state of a Composable object
func GetUnstructuredObject ¶
func GetUnstructuredObject(tContext TestContext, namespacedname types.NamespacedName, obj *unstructured.Unstructured) func() error
GetObject gets the object from the store
func LoadComposable ¶
func LoadComposable(filename string) v1alpha1.Composable
LoadComposable loads the YAML spec into Composable object
func LoadObject ¶
LoadObject loads the YAML spec into obj
func PostInNs ¶
func PostInNs(tContext TestContext, obj client.Object, async bool, delay time.Duration) client.Object
PostInNs the object
func UpdateObject ¶
func UpdateObject(tContext TestContext, obj client.Object, async bool, delay time.Duration) client.Object
Updates the given object
Types ¶
type TestContext ¶
type TestContext interface { context.Context // The dynamic client Client() client.Client // The object namespace being reconciled Namespace() string }
TestContext represents a context for test operations
func NewTestContext ¶
func NewTestContext(client client.Client, namespace string) TestContext
New creates a reconcile context
Click to show internal directories.
Click to hide internal directories.