@@ -27,20 +27,23 @@ var _ = Describe("runnables", func() {
27
27
r := newRunnables (defaultBaseContext , errCh )
28
28
Expect (r .Add (server )).To (Succeed ())
29
29
Expect (r .HTTPServers .startQueue ).To (HaveLen (1 ))
30
+ Expect (r .Others .startQueue ).To (BeEmpty ())
30
31
})
31
32
32
33
It ("should add caches to the appropriate group" , func () {
33
34
cache := & cacheProvider {cache : & informertest.FakeInformers {Error : fmt .Errorf ("expected error" )}}
34
35
r := newRunnables (defaultBaseContext , errCh )
35
36
Expect (r .Add (cache )).To (Succeed ())
36
37
Expect (r .Caches .startQueue ).To (HaveLen (1 ))
38
+ Expect (r .Others .startQueue ).To (BeEmpty ())
37
39
})
38
40
39
41
It ("should add webhooks to the appropriate group" , func () {
40
42
webhook := webhook .NewServer (webhook.Options {})
41
43
r := newRunnables (defaultBaseContext , errCh )
42
44
Expect (r .Add (webhook )).To (Succeed ())
43
45
Expect (r .Webhooks .startQueue ).To (HaveLen (1 ))
46
+ Expect (r .Others .startQueue ).To (BeEmpty ())
44
47
})
45
48
46
49
It ("should add any runnable to the leader election group" , func () {
@@ -52,6 +55,7 @@ var _ = Describe("runnables", func() {
52
55
r := newRunnables (defaultBaseContext , errCh )
53
56
Expect (r .Add (runnable )).To (Succeed ())
54
57
Expect (r .LeaderElection .startQueue ).To (HaveLen (1 ))
58
+ Expect (r .Others .startQueue ).To (BeEmpty ())
55
59
})
56
60
57
61
It ("should add WarmupRunnable to the Warmup and LeaderElection group" , func () {
@@ -69,6 +73,7 @@ var _ = Describe("runnables", func() {
69
73
Expect (r .Add (warmupRunnable )).To (Succeed ())
70
74
Expect (r .Warmup .startQueue ).To (HaveLen (1 ))
71
75
Expect (r .LeaderElection .startQueue ).To (HaveLen (1 ))
76
+ Expect (r .Others .startQueue ).To (BeEmpty ())
72
77
})
73
78
74
79
It ("should add WarmupRunnable that doesn't needs leader election to warmup group only" , func () {
@@ -90,6 +95,7 @@ var _ = Describe("runnables", func() {
90
95
91
96
Expect (r .Warmup .startQueue ).To (HaveLen (1 ))
92
97
Expect (r .LeaderElection .startQueue ).To (BeEmpty ())
98
+ Expect (r .Others .startQueue ).To (HaveLen (1 ))
93
99
})
94
100
95
101
It ("should add WarmupRunnable that needs leader election to Warmup and LeaderElection group, not Others" , func () {
0 commit comments