jetstack-secure icon indicating copy to clipboard operation
jetstack-secure copied to clipboard

VC-35738: Assert the logs in TestNoneCache

Open maelvls opened this issue 1 year ago • 0 comments

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?

maelvls avatar Nov 14 '24 10:11 maelvls