Documentation ¶
Index ¶
- func CreateCertSecret(name, namespace string, dnsNames ...string) *corev1.Secret
- func ExpectBundleContents(bundle *corev1.ConfigMap, secrets ...types.NamespacedName)
- func ExpectEnv(env []v1.EnvVar, key, value string)
- func ExpectGlobalAlertTemplateToBePopulated(resource runtime.Object)
- func ExpectGlobalReportType(resource runtime.Object, name string)
- func ExpectK8sServiceEpEnvVars(podSpec corev1.PodSpec, host, port string)
- func ExpectNoK8sServiceEpEnvVars(podSpec corev1.PodSpec)
- func ExpectResource(expected client.Object, resources []client.Object) error
- func ExpectResourceInList(objs []client.Object, name, ns, group, version, kind string)
- func ExpectResourceTypeAndObjectMetadata(resource runtime.Object, name, ns, group, version, kind string)
- func ExpectResources(resources []client.Object, expected []client.Object)
- func ExpectVolumeMount(vms []v1.VolumeMount, name, path string)
- func GetContainer(containers []v1.Container, name string) *v1.Container
- func GetGlobalResource(resources []client.Object, name, group, version, kind string) client.Object
- func GetResource(resources []client.Object, name, ns, group, version, kind string) client.Object
- func GetResourceOfType[T client.Object](resources []client.Object, name, ns string) (T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertSecret ¶
CreateCertSecret creates a secret that is not signed by the certificate manager, making it useful for testing legacy operator secrets or secrets that are brought to the cluster by the customer.
func ExpectBundleContents ¶ added in v1.34.0
func ExpectBundleContents(bundle *corev1.ConfigMap, secrets ...types.NamespacedName)
func ExpectGlobalReportType ¶
func ExpectNoK8sServiceEpEnvVars ¶ added in v1.22.0
func ExpectResource ¶
ExpectResource checks that the given list of resources contains a resource with the given name and namespace, and that the resource has the given GroupVersionKind.
func ExpectResourceInList ¶ added in v1.19.0
func ExpectResourceTypeAndObjectMetadata ¶ added in v1.32.0
func ExpectResourceTypeAndObjectMetadata(resource runtime.Object, name, ns, group, version, kind string)
ExpectResourceTypeAndObjectMetadata checks that the given resource matches the expected name, namespace, group, version, and kind. Note that this function often results in tests that are brittle and subject to breakages when resource ordering changes, and are also hard to debug. most tests should use ExpectResources instead, which is more robust and provides better error messages. Use this function only when the order of resources is actually important.
func ExpectResources ¶ added in v1.32.0
ExpectResources checks that the given list of resources contains the expected resources, and that the given resource list does not contain any unexpected resources.
func ExpectVolumeMount ¶ added in v1.25.2
func ExpectVolumeMount(vms []v1.VolumeMount, name, path string)
func GetGlobalResource ¶ added in v1.30.0
func GetResource ¶
GetResource returns the resource with the given name, namespace, group, version, and kind from the given list of resources.
Types ¶
This section is empty.