You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/09/30 18:48:27 UTC
[GitHub] [trafficcontrol] rawlinp commented on a change in pull request #5064: Sorting Traffic Ops GET /api/*/cdns alphabetically
rawlinp commented on a change in pull request #5064:
URL: https://github.com/apache/trafficcontrol/pull/5064#discussion_r497727350
##########
File path: traffic_ops/testing/api/v3/cdns_test.go
##########
@@ -92,6 +93,16 @@ func CreateTestCDNs(t *testing.T) {
}
+func SortTestCDNs(t *testing.T) {
+ var header http.Header
+ for _, cdn := range testData.CDNs {
+ _, reqInf, err := TOSession.GetCDNByNameWithHdr(cdn.Name, header)
Review comment:
So this doesn't really verify that the response is sorted alphabetically. Maybe we should take the response of all the CDNs, iterate over them, and use `strings.Compare` to make sure the response is sorted as expected.
----------------------------------------------------------------
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:
users@infra.apache.org