test: NoticeHandler close cleans up
This commit is contained in:
+7
-2
@@ -62,7 +62,12 @@ func TestNoticeHandler(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("close cleans up", func(t *testing.T) {
|
t.Run("close cleans up", func(t *testing.T) {
|
||||||
// h.Close()
|
_, envoy := newMockEnvoy(t)
|
||||||
// assert <-h.Notices() returns zero Notice, ok == false
|
h := NewNoticeHandler(envoy)
|
||||||
|
|
||||||
|
h.Close()
|
||||||
|
|
||||||
|
_, ok := <-h.Notices()
|
||||||
|
assert.False(t, ok, "notices channel should be closed")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user