Closed johanvandeweerd closed 1 year ago
Hello @johanvandeweerd,
It has been a while before the confirmation. Indeed it is not possible, however using the snapshot functionality, you will get similar behavior and less coding.
Greetings, @quintush
Thanks for the feedback.
Currently it's not possible to assert a whole manifest/document.
When you have this manifest:
and this unit test with an
equal
assert with an emptypath
:I would expect the test to pass but it fails with following output:
When browsing the code I see when
path
is empty, the whole manifest is returned and then this is passed toreflect.DeepEqual
.reflect.DeepEqual
checks if both types are the same (which they aren't) and fails the test. See https://github.com/quintush/helm-unittest/blob/master/pkg/unittest/validators/equal_validator.go#L63 for more info.