Clean this test up a trivial amount using require.Implementsf().

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2020-12-16 21:09:02 -06:00
parent dc8e7a2f39
commit b60542f0d1
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D

View File

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