Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IgnoreTimestampUpdates = cmp.Comparer(func(x, y metav1.Time) bool {
return x == emptyTime && y == emptyTime ||
x != emptyTime && y != emptyTime
})
IgnoreTimestampUpdates ignores timestamps when testing equality, unless one is empty and the other is not.
This is used to test R*Sync equality, because the timestamps get updated every time, even if nothing else changed.
Functions ¶
func GenericResourcesEqual ¶
func GenericResourcesEqual(decoder decode.Decoder, l []v1.GenericResources, r []v1.GenericResources, cmpOptions ...cmp.Option) (bool, error)
GenericResourcesEqual returns true if the GenericResources slices are equivalent. Since the GenericResources in the cluster have the RawExtension.Raw field populated and the ones being generated have the RawExtension.Object field populated, we need to decode them to have a common representation for comparing the underlying resources.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.