zrhoffman commented on a change in pull request #5128:
URL: https://github.com/apache/trafficcontrol/pull/5128#discussion_r505018900
##########
File path: traffic_ops/traffic_ops_golang/server/servers.go
##########
@@ -987,19 +994,16 @@ func getServers(h http.Header, params map[string]string,
tx *sqlx.Tx, user *auth
return returnable, serverCount, nil, nil, http.StatusOK, &maxTime
}
-// getMidServers gets the mids used by the servers in this DS.
-//
-// Original comment from the Perl code:
-//
-// If the delivery service employs mids, we're gonna pull mid servers too by
-// pulling the cachegroups of the edges and finding those cachegroups parent
-// cachegroup... then we see which servers have cachegroup in parent cachegroup
-// list...that's how we find mids for the ds :)
-func getMidServers(edgeIDs []int, servers map[int]tc.ServerNullable, tx
*sqlx.Tx) ([]int, error, error, int) {
+// getMidServers gets the mids used by the edges provided with an option to
filter for a given cdn
+func getMidServers(edgeIDs []int, servers map[int]tc.ServerNullable, cdnID
int, tx *sqlx.Tx) ([]int, error, error, int) {
Review comment:
servers unit test fails
```go
[user@computer server]$ go test
# github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/server
[github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/server.test]
./servers_test.go:478:48: not enough arguments in call to getMidServers
have ([]int, map[int]tc.ServerNullable, *sqlx.Tx)
want ([]int, map[int]tc.ServerNullable, int, *sqlx.Tx)
FAIL
github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/server [build
failed]
```
----------------------------------------------------------------
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]