mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	remove redundant condition
This commit is contained in:
		@@ -638,14 +638,13 @@ func TestDeletePods(t *testing.T) {
 | 
				
			|||||||
					if _, ok := ifHasBeenCalled[name]; !ok {
 | 
										if _, ok := ifHasBeenCalled[name]; !ok {
 | 
				
			||||||
						ifHasBeenCalled[name] = true
 | 
											ifHasBeenCalled[name] = true
 | 
				
			||||||
						return &oldPod, nil
 | 
											return &oldPod, nil
 | 
				
			||||||
					} else {
 | 
					 | 
				
			||||||
						if oldPod.ObjectMeta.Generation < 4 {
 | 
					 | 
				
			||||||
							newPod := newPodMap[name]
 | 
					 | 
				
			||||||
							return &newPod, nil
 | 
					 | 
				
			||||||
						} else {
 | 
					 | 
				
			||||||
							return nil, apierrors.NewNotFound(schema.GroupResource{Resource: "pods"}, name)
 | 
					 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
										if oldPod.ObjectMeta.Generation < 4 {
 | 
				
			||||||
 | 
											newPod := newPodMap[name]
 | 
				
			||||||
 | 
											return &newPod, nil
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										return nil, apierrors.NewNotFound(schema.GroupResource{Resource: "pods"}, name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				return nil, apierrors.NewNotFound(schema.GroupResource{Resource: "pods"}, name)
 | 
									return nil, apierrors.NewNotFound(schema.GroupResource{Resource: "pods"}, name)
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
@@ -662,7 +661,7 @@ func TestDeletePods(t *testing.T) {
 | 
				
			|||||||
				if oldPod, found := oldPodMap[name]; found {
 | 
									if oldPod, found := oldPodMap[name]; found {
 | 
				
			||||||
					return &oldPod, nil
 | 
										return &oldPod, nil
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				return nil, errors.New(fmt.Sprintf("%q: not found", name))
 | 
									return nil, fmt.Errorf("%q: not found", name)
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user