ocket8888 commented on a change in pull request #4700:
URL: https://github.com/apache/trafficcontrol/pull/4700#discussion_r428777421



##########
File path: traffic_ops/testing/api/v1/atsconfig_test.go
##########
@@ -108,3 +105,83 @@ func GetTestATSConfigs(t *testing.T) {
                }
        }
 }
+
+
+
+func CreateTestDeliveryServiceServers(t *testing.T) {
+       dses, _, err := TOSession.GetDeliveryServices()
+       if err != nil {
+               t.Errorf("cannot GET DeliveryServices: %v", err)
+       }
+       if len(dses) < 1 {
+               t.Error("GET DeliveryServices returned no dses, must have at 
least 1 to test ds-servers")
+       }
+
+       servers, _, err := TOSession.GetServers()
+       if err != nil {
+               t.Errorf("cannot GET Servers: %v", err)
+       }
+       if len(servers) < 1 {
+               t.Error("GET Servers returned no servers, must have at least 1 
to test ds-servers")
+       }
+
+       for _, ds := range dses {
+               serverIDs := make([]int, 0, len(servers))
+               for _, server := range servers {
+                       if server.Type == "EDGE" && server.CDNName == 
ds.CDNName {

Review comment:
       That's not my logic, I just moved it because I deleted the file it was 
originally in but other tests rely on it.




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