Explicitly return nil for underlying cluster's service in Federated Service e2e cleanup function.

pull/6/head
Madhusudan.C.S 2016-09-30 11:54:39 -07:00
parent 918e99e298
commit ade055f3b5
1 changed files with 5 additions and 1 deletions

View File

@ -300,6 +300,10 @@ func cleanupServiceShardsAndProviderResources(namespace string, service *v1.Serv
// Get failed with an error, try again.
framework.Logf("Failed to find service %q in namespace %q, in cluster %q: %v. Trying again in %s", service.Name, namespace, name, err, framework.Poll)
return false, nil
} else if errors.IsNotFound(err) {
cSvc = nil
By(fmt.Sprintf("Service %q in namespace %q in cluster %q not found", service.Name, namespace, name))
return true, nil
}
By(fmt.Sprintf("Service %q in namespace %q in cluster %q found", service.Name, namespace, name))
return true, nil
@ -307,7 +311,7 @@ func cleanupServiceShardsAndProviderResources(namespace string, service *v1.Serv
if err != nil || cSvc == nil {
By(fmt.Sprintf("Failed to find service %q in namespace %q, in cluster %q in %s", service.Name, namespace, name, FederatedServiceTimeout))
return
continue
}
err = cleanupServiceShard(c.Clientset, name, namespace, cSvc, FederatedServiceTimeout)