fix useless type assertion in session recorder test (#33267)

This commit is contained in:
Andrew LeFevre 2023-10-11 10:59:42 -04:00 committed by GitHub
parent de3a0cc5fd
commit b1a2444061
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -242,11 +242,7 @@ func TestSession_newRecorder(t *testing.T) {
isNotSessionWriter := func(t require.TestingT, i interface{}, i2 ...interface{}) {
require.NotNil(t, i)
//nolint:govet // events.setterAndRecorder is returned when
//events will be discarded so we can't do a type assertion on that.
// Assert that what is returned isn't an event.SessionWriter, which
// is what is used normally.
_, ok := i.(events.SessionWriter)
_, ok := i.(*events.SessionWriter)
require.False(t, ok)
}