Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RuntimeObjectIgnoreRvTypeMeta = cmp.Comparer(func(x, y runtime.Object) bool { xCopy := x.DeepCopyObject() yCopy := y.DeepCopyObject() CleanRVAndTypeMeta(xCopy) CleanRVAndTypeMeta(yCopy) return cmp.Diff(xCopy, yCopy) == "" })
RuntimeObjectIgnoreRvTypeMeta compares two kubernetes objects, ignoring their resource version and TypeMeta. It is what you want 99% of the time.
Functions ¶
func CleanRVAndTypeMeta ¶
func CompareWithFixture ¶
CompareWithFixture will compare output with a test fixture and allows to automatically update them by setting the UPDATE env var. If output is not a []byte or string, it will get serialized as yaml prior to the comparison. The fixtures are stored in $PWD/testdata/prefix${testName}.yaml
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.