Fix nil pointer panic in service LB e2e tests

This commit is contained in:
Zihong Zheng 2017-10-24 20:01:50 -07:00
parent 96fecb2833
commit 4987314b31

View File

@ -4860,7 +4860,7 @@ func CleanupGCEResources(c clientset.Interface, loadBalancerName, zone string) (
if hc != nil {
hcNames = append(hcNames, hc.Name)
}
if err := gceCloud.DeleteExternalTargetPoolAndChecks(nil, loadBalancerName, region, clusterID, hcNames...); err != nil &&
if err := gceCloud.DeleteExternalTargetPoolAndChecks(&v1.Service{}, loadBalancerName, region, clusterID, hcNames...); err != nil &&
!IsGoogleAPIHTTPErrorCode(err, http.StatusNotFound) {
retErr = fmt.Errorf("%v\n%v", retErr, err)
}