zrhoffman commented on a change in pull request #4966:
URL: https://github.com/apache/trafficcontrol/pull/4966#discussion_r478951846



##########
File path: traffic_ops/testing/api/v3/servers_test.go
##########
@@ -166,24 +166,54 @@ func GetTestServersQueryParameters(t *testing.T) {
 
        params := url.Values{}
        params.Add("dsId", strconv.Itoa(*ds.ID))
-       _, _, err = TOSession.GetServers(&params)
+       _, _, err = TOSession.GetServersWithHdr(&params, nil)
        if err != nil {
                t.Fatalf("Failed to get server by Delivery Service ID: %v", err)
        }
 
        currentTime := time.Now().UTC().Add(5 * time.Second)
-       time := currentTime.Format(time.RFC1123)
+       timestamp := currentTime.Format(time.RFC1123)
        var header http.Header
        header = make(map[string][]string)
-       header.Set(rfc.IfModifiedSince, time)
+       header.Set(rfc.IfModifiedSince, timestamp)
        _, reqInf, _ := TOSession.GetServersWithHdr(&params, header)
        if reqInf.StatusCode != http.StatusNotModified {
                t.Errorf("Expected a status code of 304, got %v", 
reqInf.StatusCode)
        }
 
+       foundTopDs := false
+       const topDsXmlId = "ds-top"
+       for _, ds = range dses {
+               if ds.XMLID != nil && *ds.XMLID != topDsXmlId {
+                       continue
+               }
+               foundTopDs = true
+               break

Review comment:
       Oops, I just mindlessly added a nil check. Logic fixed in 488f88fb8




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