@@ -326,6 +326,80 @@ func TestDeepDefaults(t *testing.T) {
326
326
return * obj .Spec .Strategy .RecreateParams .TimeoutSeconds == deployapi .DefaultRollingTimeoutSeconds
327
327
},
328
328
},
329
+ {
330
+ External : & deployv1.DeploymentConfig {
331
+ Spec : deployv1.DeploymentConfigSpec {
332
+ Template : & kapiv1.PodTemplateSpec {
333
+ Spec : kapiv1.PodSpec {
334
+ Containers : []kapiv1.Container {
335
+ {Name : "first" },
336
+ },
337
+ },
338
+ },
339
+ Strategy : deployv1.DeploymentStrategy {
340
+ Type : deployv1 .DeploymentStrategyTypeRecreate ,
341
+ RecreateParams : & deployv1.RecreateDeploymentStrategyParams {
342
+ Pre : & deployv1.LifecycleHook {
343
+ TagImages : []deployv1.TagImageHook {{}},
344
+ ExecNewPod : & deployv1.ExecNewPodHook {},
345
+ },
346
+ Mid : & deployv1.LifecycleHook {
347
+ TagImages : []deployv1.TagImageHook {{}},
348
+ ExecNewPod : & deployv1.ExecNewPodHook {},
349
+ },
350
+ Post : & deployv1.LifecycleHook {
351
+ TagImages : []deployv1.TagImageHook {{}},
352
+ ExecNewPod : & deployv1.ExecNewPodHook {},
353
+ },
354
+ },
355
+ },
356
+ },
357
+ },
358
+ Internal : & deployapi.DeploymentConfig {},
359
+ Ok : func (out runtime.Object ) bool {
360
+ obj := out .(* deployapi.DeploymentConfig )
361
+ return obj .Spec .Strategy .RecreateParams .Pre .ExecNewPod .ContainerName == "first" &&
362
+ obj .Spec .Strategy .RecreateParams .Mid .ExecNewPod .ContainerName == "first" &&
363
+ obj .Spec .Strategy .RecreateParams .Post .ExecNewPod .ContainerName == "first" &&
364
+ obj .Spec .Strategy .RecreateParams .Pre .TagImages [0 ].ContainerName == "first" &&
365
+ obj .Spec .Strategy .RecreateParams .Mid .TagImages [0 ].ContainerName == "first" &&
366
+ obj .Spec .Strategy .RecreateParams .Post .TagImages [0 ].ContainerName == "first"
367
+ },
368
+ },
369
+ {
370
+ External : & deployv1.DeploymentConfig {
371
+ Spec : deployv1.DeploymentConfigSpec {
372
+ Template : & kapiv1.PodTemplateSpec {
373
+ Spec : kapiv1.PodSpec {
374
+ Containers : []kapiv1.Container {
375
+ {Name : "first" },
376
+ },
377
+ },
378
+ },
379
+ Strategy : deployv1.DeploymentStrategy {
380
+ Type : deployv1 .DeploymentStrategyTypeRecreate ,
381
+ RollingParams : & deployv1.RollingDeploymentStrategyParams {
382
+ Pre : & deployv1.LifecycleHook {
383
+ TagImages : []deployv1.TagImageHook {{}},
384
+ ExecNewPod : & deployv1.ExecNewPodHook {},
385
+ },
386
+ Post : & deployv1.LifecycleHook {
387
+ TagImages : []deployv1.TagImageHook {{}},
388
+ ExecNewPod : & deployv1.ExecNewPodHook {},
389
+ },
390
+ },
391
+ },
392
+ },
393
+ },
394
+ Internal : & deployapi.DeploymentConfig {},
395
+ Ok : func (out runtime.Object ) bool {
396
+ obj := out .(* deployapi.DeploymentConfig )
397
+ return obj .Spec .Strategy .RollingParams .Pre .ExecNewPod .ContainerName == "first" &&
398
+ obj .Spec .Strategy .RollingParams .Post .ExecNewPod .ContainerName == "first" &&
399
+ obj .Spec .Strategy .RollingParams .Pre .TagImages [0 ].ContainerName == "first" &&
400
+ obj .Spec .Strategy .RollingParams .Post .TagImages [0 ].ContainerName == "first"
401
+ },
402
+ },
329
403
{
330
404
External : & deployv1.DeploymentConfig {
331
405
Spec : deployv1.DeploymentConfigSpec {
0 commit comments