diff --git a/internal/controller/controller_test.go b/internal/controller/controller_test.go index 0cf97e21..bfb35495 100644 --- a/internal/controller/controller_test.go +++ b/internal/controller/controller_test.go @@ -20,10 +20,8 @@ func TestCacheMutationDetectorEnabled(t *testing.T) { c := cache.NewCacheMutationDetector("test pinniped") - type isRealCacheMutationDetector interface { + type realCacheMutationDetector interface { CompareObjects() // this is brittle, but this function name has never changed... } - - _, ok := c.(isRealCacheMutationDetector) - require.Truef(t, ok, "%T is not a real cache mutation detector", c) + require.Implementsf(t, (*realCacheMutationDetector)(nil), c, "%T is not a real cache mutation detector", c) }