Documentation ¶
Index ¶
- Variables
- func DeleteAll(cfg *rest.Config, timeout time.Duration, objLists ...runtime.Object)
- func WithAPIVersion(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
- func WithContainers(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
- func WithCreationTimestamp(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
- func WithImage(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
- func WithKind(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
- func WithResourceVersion(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
- func WithSelfLink(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
- func WithUID(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
- type Matcher
- type Object
Constants ¶
This section is empty.
Variables ¶
View Source
var ExampleCRD = &apiextensionsv1beta1.CustomResourceDefinition{ TypeMeta: metav1.TypeMeta{ APIVersion: "apiextensions.k8s.io/v1beta1", Kind: "CustomResourceDefinition", }, ObjectMeta: metav1.ObjectMeta{ Name: "foos.example.com", }, Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ Group: "example.com", Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ Kind: "Foo", Plural: "foos", }, Scope: apiextensionsv1beta1.NamespaceScoped, Version: "v1", }, }
ExampleCRD is an example CRD object for use within test suites
View Source
var ExampleDeployment = &appsv1.Deployment{ TypeMeta: metav1.TypeMeta{ APIVersion: "apps/v1", Kind: "Deployment", }, ObjectMeta: metav1.ObjectMeta{ Name: "example", Namespace: "default", Labels: appNginx, }, Spec: appsv1.DeploymentSpec{ Selector: &metav1.LabelSelector{ MatchLabels: appNginx, }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: appNginx, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { Name: "nginx", Image: "nginx", }, }, }, }, }, }
ExampleDeployment is an example Deployment object for use within test suites
View Source
var ExampleFoo = &unstructured.Unstructured{ Object: map[string]interface{}{ "apiVersion": "example.com/v1", "kind": "Foo", "metadata": map[string]interface{}{ "name": "example", "namespace": "default", }, "spec": map[string]interface{}{ "foo": "bar", }, }, }
ExampleFoo is an example Foo object for use within test suites
Functions ¶
func WithAPIVersion ¶
func WithAPIVersion(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
WithAPIVersion returns the objects TypeMeta
func WithContainers ¶
func WithContainers(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
WithContainers returns the deployments Containers
func WithCreationTimestamp ¶
func WithCreationTimestamp(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
WithCreationTimestamp returns the object's CreationTimestamp
func WithImage ¶
func WithImage(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
WithImage returns the container's image
func WithKind ¶
func WithKind(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
WithKind returns the objects TypeMeta
func WithResourceVersion ¶
func WithResourceVersion(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
WithResourceVersion returns the object's ResourceVersion
func WithSelfLink ¶
func WithSelfLink(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
WithSelfLink returns the object's SelfLink
func WithUID ¶
func WithUID(matcher gtypes.GomegaMatcher) gtypes.GomegaMatcher
WithUID returns the object's UID
Types ¶
Click to show internal directories.
Click to hide internal directories.