jetstack-secure
jetstack-secure copied to clipboard
VC-35738: Assert the logs in TestNoneCache
In #612, it is written:
// TestNoneCache demonstrates that the cache helpers do not crash if passed a
// non-cachable object, but log an error with a reference to the object type.
It says that "an error is logged", but the logs aren't asserted. I found ktesting's documentation (https://pkg.go.dev/k8s.io/klog/v2/ktesting) that it is possible to assert the logs. I've tried doing that in this PR.
WDYT?