Documentation ¶
Overview ¶
Package assert provides a function to compare the object used in the test. Use google/go-cmp to compare objects, and output diffs when there are differences.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(t TestingT, manifests *helmut.Manifests, contains runtime.Object, options ...Option) bool
Contains asserts that the specified manifests contains the specified object. If there is a difference in object, fail the test and output diffs.
func ContainsWithRawManifest ¶
func ContainsWithRawManifest(t TestingT, manifests *helmut.Manifests, contains []byte, options ...Option) bool
ContainsWithRawManifest asserts that the specified manifests contains the specified manifest raw data. If there is a difference in object, fail the test and output diffs.
Types ¶
type Option ¶
type Option func(*option)
Option is the option used when asserting.
func WithCmpOptions ¶
WithCmpOptions specifies the options to be used when comparing objects with google/go-cmp.
func WithIgnoreAnnotationKeys ¶ added in v0.0.2
WithIgnoreAnnotationKeys is an option to ignore diffs for the specified annotations. Annotations will be ignored regardless of the value of value if the key matches.
func WithIgnoreHelmManagedLabels ¶
func WithIgnoreHelmManagedLabels() Option
WithIgnoreHelmManagedLabels is an option to ignore diffs in labels that Helm is supposed to use in general. Labels will be ignored regardless of the value of value if the key matches. If you want to ignore individual labels, please use the WithIgnoreLabelKeys option.
The labels that are ignored are:
app.kubernetes.io/name app.kubernetes.io/managed-by app.kubernetes.io/instance app.kubernetes.io/version app.kubernetes.io/component app.kubernetes.io/part-of helm.sh/chart
func WithIgnoreLabelKeys ¶ added in v0.0.2
WithIgnoreLabelKeys is an option to ignore diffs for the specified labels. Labels will be ignored regardless of the value of value if the key matches.