Documentation ¶
Overview ¶
Package helpers contains helper functions for unit tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
Diff prints the diff between two structs. It is useful in testing to compare two structs when they are large. In such a case, without Diff it will be difficult to pinpoint the difference between the two structs.
func GetPointer ¶
func GetPointer[T any](v T) *T
GetPointer takes a value of any type and returns a pointer to it.
func PrepareTimeForFakeClient ¶
PrepareTimeForFakeClient processes the time similarly to the fake client from sigs.k8s.io/controller-runtime/pkg/client/fake making it is possible to use it in tests when comparing against values returned by the fake client. It panics if it fails to process the time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.