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



##########
File path: traffic_ops/testing/api/v3/servers_test.go
##########
@@ -101,6 +97,70 @@ func GetTestServersQueryParameters(t *testing.T) {
                t.Fatalf("Failed to get server by Delivery Service ID: %v", err)
        }
        params.Del("dsId")
+
+       resp, _, err := TOSession.GetServers(nil)
+       if err != nil {
+               t.Fatalf("Failed to get servers: %v", err)
+       }
+
+       if len(resp.Response) < 1 {
+               t.Fatalf("Failed to get at least one server")
+       }
+
+       s := resp.Response[0]
+
+       params.Add("type", s.Type)
+       if _, _, err := TOSession.GetServers(&params); err != nil {

Review comment:
       nit: I'm going to merge this anyways, but if you really want to level up 
this testing you could iterate over the servers and verify that the response 
only contains the properly filtered servers




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