We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f7b96c commit 597b50dCopy full SHA for 597b50d
internal/mode/static/health_test.go
@@ -23,3 +23,18 @@ func TestReadyCheck(t *testing.T) {
23
healthChecker.ready = true
24
g.Expect(healthChecker.readyCheck(nil)).To(Succeed())
25
}
26
+
27
+func TestSetAsLeader(t *testing.T) {
28
+ t.Parallel()
29
+ g := NewWithT(t)
30
+ healthChecker := newGraphBuiltHealthChecker()
31
+ healthChecker.eventCh = make(chan interface{}, 1)
32
33
+ g.Expect(healthChecker.leader).To(BeFalse())
34
+ g.Expect(healthChecker.eventCh).ShouldNot(Receive())
35
36
+ healthChecker.setAsLeader()
37
38
+ g.Expect(healthChecker.leader).To(BeTrue())
39
+ g.Expect(healthChecker.eventCh).Should(Receive())
40
+}
0 commit comments