rawlinp commented on a change in pull request #5054:
URL: https://github.com/apache/trafficcontrol/pull/5054#discussion_r493660125



##########
File path: traffic_ops/testing/api/v3/servers_test.go
##########
@@ -358,6 +359,39 @@ func GetTestServersQueryParameters(t *testing.T) {
        if !foundTopDs {
                t.Fatalf("unable to find deliveryservice %s", topDsXmlId)
        }
+
+       /* Create a deliveryservice server assignment that should not show up 
in the
+        * client.GetServersWithHdr() response because ds-top is topology-based
+        */
+       const otherServerHostname = "topology-edge-02"
+       serverResponse, _, err := 
TOSession.GetServersWithHdr(&url.Values{"hostName": 
[]string{otherServerHostname}}, nil)
+       if err != nil {
+               t.Fatalf("getting server by hostname %s: %s", 
otherServerHostname, err)
+       }
+       if len(serverResponse.Response) != 1 {
+               t.Fatalf("unable to find server with hostname %s", 
otherServerHostname)
+       }
+       otherServer := serverResponse.Response[0]
+
+       db, err := OpenConnection()

Review comment:
       Should we use the TO Go client to do this instead of making a direct DB 
query? `CreateDeliveryServiceServers()` or `AssignServersToDeliveryService()`?




----------------------------------------------------------------
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]


Reply via email to