GabrielBrascher commented on pull request #4010:
URL: https://github.com/apache/cloudstack/pull/4010#issuecomment-658180971


   @kioie sorry for the late reply. I picked the branch to do a few checks (it 
is easier than reviewing solely via git diff). Most of the code is already 
concise. So ignore the part of being too big. 
   
   Additionally, in theory, methods that you are using should already have 
their own test cases (not your fault, so feel free to ignore it), Thus testing 
updatePodIpRange would be a matter of running a verify checking if the methods 
are called on the correct order..
   ```
           verifyIpRangeParameters(currentStartIP,currentEndIP);
           verifyIpRangeParameters(newStartIP,newEndIP);
           
checkIpRangeContainsTakenAddresses(pod,currentStartIP,currentEndIP,newStartIP,newEndIP);
   
           String vlan = 
verifyPodIpRangeExists(podId,existingPodIpRanges,currentStartIP,currentEndIP,newStartIP,newEndIP);
   ```
   
   I would suggest adding a few test cases on `verifyPodIpRangeExists`, if 
possible. And maybe changing the name of `verifyPodIpRangeExists` to something 
as `retrievePodIpRangeVlan` or `validatePodIpRangeAndRetrieveVlan`.
   
   But overall looks good.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to