Closed nunnatsa closed 1 year ago
When comapring two pointrs like this: Expect(p1 != p2).To(BeTrue())
Expect(p1 != p2).To(BeTrue())
For go, it means comparing the addresses. The linter changes this to
Expect(p1).ToNot(Equal(p2)).
Expect(p1).ToNot(Equal(p2))
But in this case gomega compares the values pointed by the pointers.
This PR fixes this issue by using the BeIdenticalTo matcher in case of pointers coparison.
BeIdenticalTo
Please delete options that are not relevant.
@nunnatsa
Description
When comapring two pointrs like this:
Expect(p1 != p2).To(BeTrue())
For go, it means comparing the addresses. The linter changes this to
Expect(p1).ToNot(Equal(p2))
.But in this case gomega compares the values pointed by the pointers.
This PR fixes this issue by using the
BeIdenticalTo
matcher in case of pointers coparison.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Checklist:
@nunnatsa