Documentation
¶
Index ¶
- func CreateNamespaceOrDie(namespaces corev1.NamespaceInterface, stem string) string
- func CreateObject(tContext TestContext, obj runtime.Object, async bool, delay time.Duration) runtime.Object
- func DeleteInNs(tContext TestContext, obj runtime.Object, async bool)
- func DeleteObject(tContext TestContext, obj runtime.Object, async bool)
- func GetClientsetOrDie(restCfg *rest.Config) *kubernetes.Clientset
- func GetObject(tContext TestContext, obj runtime.Object) func() runtime.Object
- func GetState(tContext TestContext, comp *v1alpha1.Composable) func() string
- func GetUnstructuredObject(tContext TestContext, namespacedname types.NamespacedName, ...) func() error
- func LoadCompasable(filename string) v1alpha1.Composable
- func LoadObject(filename string, obj runtime.Object) runtime.Object
- func PostInNs(tContext TestContext, obj runtime.Object, async bool, delay time.Duration) runtime.Object
- func SetupKubeOrDie(restCfg *rest.Config, stem string) string
- func StartTestManager(mgr manager.Manager) chan struct{}
- func UpdateObject(tContext TestContext, obj runtime.Object, async bool, delay time.Duration) runtime.Object
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNamespaceOrDie ¶
func CreateNamespaceOrDie(namespaces corev1.NamespaceInterface, stem string) string
CreateNamespaceOrDie creates a new unique namespace from stem
func CreateObject ¶
func CreateObject(tContext TestContext, obj runtime.Object, async bool, delay time.Duration) runtime.Object
Creates the object
func DeleteInNs ¶
func DeleteInNs(tContext TestContext, obj runtime.Object, async bool)
DeletInNs the object
func DeleteObject ¶
func DeleteObject(tContext TestContext, obj runtime.Object, async bool)
DeleteObject deletes an object
func GetClientsetOrDie ¶
func GetClientsetOrDie(restCfg *rest.Config) *kubernetes.Clientset
GetClientsetOrDie gets a Kube clientset for KUBECONFIG
func GetObject ¶
func GetObject(tContext TestContext, obj runtime.Object) func() runtime.Object
GetObject gets the object from the store
func GetState ¶
func GetState(tContext TestContext, comp *v1alpha1.Composable) func() string
GetState gets the object status from the store
func GetUnstructuredObject ¶
func GetUnstructuredObject(tContext TestContext, namespacedname types.NamespacedName, obj *unstructured.Unstructured) func() error
GetObject gets the object from the store
func LoadCompasable ¶
func LoadCompasable(filename string) v1alpha1.Composable
LoadService loads the YAML spec into obj
func LoadObject ¶
LoadObject loads the YAML spec into obj
func PostInNs ¶
func PostInNs(tContext TestContext, obj runtime.Object, async bool, delay time.Duration) runtime.Object
PostInNs the object
func SetupKubeOrDie ¶
SetupKubeOrDie setups Kube for testing
func StartTestManager ¶
StartTestManager starts the manager
func UpdateObject ¶
func UpdateObject(tContext TestContext, obj runtime.Object, async bool, delay time.Duration) runtime.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.