mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 13:50:01 +00:00 
			
		
		
		
	Update test utilities & build file
This commit is contained in:
		| @@ -5167,20 +5167,15 @@ func CleanupGCEResources(loadBalancerName string) (retErr error) { | ||||
| 		!IsGoogleAPIHTTPErrorCode(err, http.StatusNotFound) { | ||||
| 		retErr = err | ||||
| 	} | ||||
| 	if err := gceCloud.DeleteForwardingRule(loadBalancerName); err != nil && | ||||
| 	if err := gceCloud.DeleteRegionForwardingRule(loadBalancerName, gceCloud.Region()); err != nil && | ||||
| 		!IsGoogleAPIHTTPErrorCode(err, http.StatusNotFound) { | ||||
| 		retErr = fmt.Errorf("%v\n%v", retErr, err) | ||||
|  | ||||
| 	} | ||||
| 	if err := gceCloud.DeleteGlobalStaticIP(loadBalancerName); err != nil && | ||||
| 	if err := gceCloud.DeleteRegionAddress(loadBalancerName, gceCloud.Region()); err != nil && | ||||
| 		!IsGoogleAPIHTTPErrorCode(err, http.StatusNotFound) { | ||||
| 		retErr = fmt.Errorf("%v\n%v", retErr, err) | ||||
| 	} | ||||
| 	// This function shells out to gcloud, so we can't compare for NotFound errors. | ||||
| 	// TODO: Invoke cloudprovider method directly instead. | ||||
| 	if err := DeleteGCEStaticIP(loadBalancerName); err != nil { | ||||
| 		Logf("%v", err) | ||||
| 	} | ||||
| 	var hcNames []string | ||||
| 	hc, getErr := gceCloud.GetHttpHealthCheck(loadBalancerName) | ||||
| 	if getErr != nil && !IsGoogleAPIHTTPErrorCode(getErr, http.StatusNotFound) { | ||||
| @@ -5190,7 +5185,7 @@ func CleanupGCEResources(loadBalancerName string) (retErr error) { | ||||
| 	if hc != nil { | ||||
| 		hcNames = append(hcNames, hc.Name) | ||||
| 	} | ||||
| 	if err := gceCloud.DeleteTargetPool(loadBalancerName, hcNames...); err != nil && | ||||
| 	if err := gceCloud.DeleteExternalTargetPoolAndChecks(loadBalancerName, gceCloud.Region(), hcNames...); err != nil && | ||||
| 		!IsGoogleAPIHTTPErrorCode(err, http.StatusNotFound) { | ||||
| 		retErr = fmt.Errorf("%v\n%v", retErr, err) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user