chore: add more tests (#3338)
This commit is contained in:
@@ -53,6 +53,19 @@ func TestComboHealthManager(t *testing.T) {
|
||||
assert.True(t, chm.IsReady())
|
||||
})
|
||||
|
||||
t.Run("is ready verbose", func(t *testing.T) {
|
||||
chm := newComboHealthManager()
|
||||
hm := NewHealthManager(probeName)
|
||||
|
||||
assert.True(t, chm.IsReady())
|
||||
chm.addProbe(hm)
|
||||
assert.False(t, chm.IsReady())
|
||||
hm.MarkReady()
|
||||
assert.True(t, chm.IsReady())
|
||||
assert.Contains(t, chm.verboseInfo(), probeName)
|
||||
assert.Contains(t, chm.verboseInfo(), "is ready")
|
||||
})
|
||||
|
||||
t.Run("concurrent add probes", func(t *testing.T) {
|
||||
chm := newComboHealthManager()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user