@@ -110,16 +110,13 @@ func TestSetProbes(t *testing.T) {
110110 tests := []struct {
111111 name string
112112 customLiveness corev1.Probe
113- customStartup corev1.Probe
114113 customReadiness corev1.Probe
115114 wantLiveness * corev1.Probe
116- wantStartup * corev1.Probe
117115 wantReadiness * corev1.Probe
118116 }{
119117 {
120118 name : "No Custom probes" ,
121119 customLiveness : corev1.Probe {},
122- customStartup : corev1.Probe {},
123120 customReadiness : corev1.Probe {},
124121 wantLiveness : & corev1.Probe {
125122 Handler : corev1.Handler {
@@ -132,17 +129,6 @@ func TestSetProbes(t *testing.T) {
132129 PeriodSeconds : 10 ,
133130 FailureThreshold : 3 ,
134131 },
135- wantStartup : & corev1.Probe {
136- Handler : corev1.Handler {
137- HTTPGet : & corev1.HTTPGetAction {
138- Path : "/api/v4/system/ping" ,
139- Port : intstr .FromInt (8065 ),
140- },
141- },
142- InitialDelaySeconds : 1 ,
143- PeriodSeconds : 10 ,
144- FailureThreshold : 60 ,
145- },
146132 wantReadiness : & corev1.Probe {
147133 Handler : corev1.Handler {
148134 HTTPGet : & corev1.HTTPGetAction {
@@ -160,9 +146,6 @@ func TestSetProbes(t *testing.T) {
160146 customLiveness : corev1.Probe {
161147 InitialDelaySeconds : 120 ,
162148 },
163- customStartup : corev1.Probe {
164- InitialDelaySeconds : 1 ,
165- },
166149 customReadiness : corev1.Probe {
167150 InitialDelaySeconds : 90 ,
168151 },
@@ -177,17 +160,6 @@ func TestSetProbes(t *testing.T) {
177160 PeriodSeconds : 10 ,
178161 FailureThreshold : 3 ,
179162 },
180- wantStartup : & corev1.Probe {
181- Handler : corev1.Handler {
182- HTTPGet : & corev1.HTTPGetAction {
183- Path : "/api/v4/system/ping" ,
184- Port : intstr .FromInt (8065 ),
185- },
186- },
187- InitialDelaySeconds : 1 ,
188- PeriodSeconds : 10 ,
189- FailureThreshold : 60 ,
190- },
191163 wantReadiness : & corev1.Probe {
192164 Handler : corev1.Handler {
193165 HTTPGet : & corev1.HTTPGetAction {
@@ -206,10 +178,6 @@ func TestSetProbes(t *testing.T) {
206178 InitialDelaySeconds : 20 ,
207179 PeriodSeconds : 20 ,
208180 },
209- customStartup : corev1.Probe {
210- InitialDelaySeconds : 20 ,
211- PeriodSeconds : 20 ,
212- },
213181 customReadiness : corev1.Probe {
214182 InitialDelaySeconds : 10 ,
215183 FailureThreshold : 10 ,
@@ -225,17 +193,6 @@ func TestSetProbes(t *testing.T) {
225193 PeriodSeconds : 20 ,
226194 FailureThreshold : 3 ,
227195 },
228- wantStartup : & corev1.Probe {
229- Handler : corev1.Handler {
230- HTTPGet : & corev1.HTTPGetAction {
231- Path : "/api/v4/system/ping" ,
232- Port : intstr .FromInt (8065 ),
233- },
234- },
235- InitialDelaySeconds : 20 ,
236- PeriodSeconds : 20 ,
237- FailureThreshold : 60 ,
238- },
239196 wantReadiness : & corev1.Probe {
240197 Handler : corev1.Handler {
241198 HTTPGet : & corev1.HTTPGetAction {
@@ -259,15 +216,6 @@ func TestSetProbes(t *testing.T) {
259216 },
260217 InitialDelaySeconds : 120 ,
261218 },
262- customStartup : corev1.Probe {
263- Handler : corev1.Handler {
264- HTTPGet : & corev1.HTTPGetAction {
265- Path : "/api/v4/system/pong" ,
266- Port : intstr .FromInt (8080 ),
267- },
268- },
269- InitialDelaySeconds : 120 ,
270- },
271219 customReadiness : corev1.Probe {
272220 Handler : corev1.Handler {
273221 HTTPGet : & corev1.HTTPGetAction {
@@ -287,17 +235,6 @@ func TestSetProbes(t *testing.T) {
287235 PeriodSeconds : 10 ,
288236 FailureThreshold : 3 ,
289237 },
290- wantStartup : & corev1.Probe {
291- Handler : corev1.Handler {
292- HTTPGet : & corev1.HTTPGetAction {
293- Path : "/api/v4/system/pong" ,
294- Port : intstr .FromInt (8080 ),
295- },
296- },
297- InitialDelaySeconds : 120 ,
298- PeriodSeconds : 10 ,
299- FailureThreshold : 60 ,
300- },
301238 wantReadiness : & corev1.Probe {
302239 Handler : corev1.Handler {
303240 HTTPGet : & corev1.HTTPGetAction {
@@ -314,9 +251,8 @@ func TestSetProbes(t *testing.T) {
314251
315252 for _ , tt := range tests {
316253 t .Run (tt .name , func (t * testing.T ) {
317- liveness , startUp , readiness := setProbes (tt .customLiveness , tt . customStartup , tt .customReadiness )
254+ liveness , readiness := setProbes (tt .customLiveness , tt .customReadiness )
318255 require .Equal (t , tt .wantLiveness , liveness )
319- require .Equal (t , tt .wantStartup , startUp )
320256 require .Equal (t , tt .wantReadiness , readiness )
321257 })
322258 }
0 commit comments