From 00eb0439d4dd75fc0740fb3af89121f92f04db1b Mon Sep 17 00:00:00 2001 From: yanxuean Date: Tue, 7 Nov 2017 09:57:59 +0800 Subject: [PATCH] delete if-else branch Signed-off-by: yanxuean --- .../replicationcontroller_test.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/integration/replicationcontroller/replicationcontroller_test.go b/test/integration/replicationcontroller/replicationcontroller_test.go index c03ec6c5f37..c98550c1dcd 100644 --- a/test/integration/replicationcontroller/replicationcontroller_test.go +++ b/test/integration/replicationcontroller/replicationcontroller_test.go @@ -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) }