Merge pull request #55198 from yanxuean/unuse-if

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

delete if-else branch

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>

**What this PR does / why we need it**:
The if-else branch is redundant.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-11-07 08:32:37 -08:00 committed by GitHub
commit b0ff44bf56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,11 +150,7 @@ func rmSetup(t *testing.T, stopCh chan struct{}) (*httptest.Server, framework.Cl
func waitToObservePods(t *testing.T, podInformer cache.SharedIndexInformer, podNum int) {
if err := wait.Poll(pollInterval, pollTimeout, func() (bool, error) {
objects := podInformer.GetIndexer().List()
if len(objects) == podNum {
return true, nil
} else {
return false, nil
}
return len(objects) == podNum, nil
}); err != nil {
t.Fatal(err)
}
@ -275,11 +271,7 @@ func waitRCStable(t *testing.T, clientSet clientset.Interface, rc *v1.Replicatio
if err != nil {
return false, err
}
if updatedRC.Status.Replicas != *rc.Spec.Replicas {
return false, nil
} else {
return true, nil
}
return updatedRC.Status.Replicas == *rc.Spec.Replicas, nil
}); err != nil {
t.Fatal(err)
}