srijeet0406 commented on pull request #5480:
URL: https://github.com/apache/trafficcontrol/pull/5480#issuecomment-770121468
Tested this in CiaB. I noticed an issue:
Consider a DS that has SSL keys associated with it.
If I try to update this DS with something that has a different CDN ID, but
no CDN Name or Routing Name, it gives me the success message, which it
shouldn't. I think it has got to do with the way you are handling the
conditional statements in `deliveryservices.go`.
I would do something like this:
`Check for ds.CDNId to not be nil`
`Now, put all the other conditionals under if hasSSLKeys {...}`
`Inside this conditional, you can check for the old and new CDN IDs to be
equal`
`Next, you would check for if the ds.RoutingName is nil or not, and if it
isn't, proceed to check if its equal to the old routing name(this check goes
within the if hasSSLKeys conditional)`
`Next, you would check for if the ds.CDNName is nil or not, and if it isn't,
proceed to check if its equal to the old CDN name (this check goes within the
if hasSSLKeys conditional)`
----------------------------------------------------------------
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:
[email protected]