srijeet0406 commented on code in PR #7756:
URL: https://github.com/apache/trafficcontrol/pull/7756#discussion_r1309096118
##########
traffic_ops/traffic_ops_golang/asn/asns.go:
##########
@@ -340,14 +340,26 @@ func Update(w http.ResponseWriter, r *http.Request) {
return
}
+ // check if asn already exists
Review Comment:
Code looks good. D you mind adding a quick test for this functionality
please?
Basically add an integration test that `GET`s the ASNs, then take the ASN ID
from that ASN and try to create a new ASN using that same ID, and expect an
error.
##########
traffic_ops/traffic_ops_golang/asn/asns.go:
##########
@@ -340,14 +340,26 @@ func Update(w http.ResponseWriter, r *http.Request) {
return
}
+ // check if asn already exists
Review Comment:
Code looks good. Do you mind adding a quick test for this functionality
please?
Basically add an integration test that `GET`s the ASNs, then take the ASN ID
from that ASN and try to create a new ASN using that same ID, and expect an
error.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]