This is an automated email from the ASF dual-hosted git repository.

rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new be815bf  Fix test failure (#4817)
be815bf is described below

commit be815bf73fa3aba3ac843b633f51d91602597cd8
Author: Steve Hamrick <[email protected]>
AuthorDate: Tue Jun 23 10:40:06 2020 -0600

    Fix test failure (#4817)
---
 traffic_ops/traffic_ops_golang/server/servers_test.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/traffic_ops/traffic_ops_golang/server/servers_test.go 
b/traffic_ops/traffic_ops_golang/server/servers_test.go
index 78b4593..15a68dd 100644
--- a/traffic_ops/traffic_ops_golang/server/servers_test.go
+++ b/traffic_ops/traffic_ops_golang/server/servers_test.go
@@ -423,7 +423,13 @@ func TestGetMidServers(t *testing.T) {
                serverMap[*server.ID] = server
        }
 
-       ts := servers[1]
+       var ts tc.ServerNullable
+       for _, s := range servers {
+               if s.HostName != nil && *s.HostName == "server2" {
+                       ts = s
+                       break
+               }
+       }
        *ts.ID = *ts.ID + 1
        rows2 = rows2.AddRow(
                ts.Cachegroup,

Reply via email to