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

zrhoffman 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 80d89e1  Fix failing servers test because of unique service ip/profile 
combo (#5440)
80d89e1 is described below

commit 80d89e13c7881f97daf639f86271f86fb3839710
Author: Srijeet Chatterjee <[email protected]>
AuthorDate: Thu Jan 14 17:09:23 2021 -0700

    Fix failing servers test because of unique service ip/profile combo (#5440)
    
    * Fix failing servers test because of unique service ip/profile combo
    
    * removing the monitor=true check
---
 traffic_ops/testing/api/v3/servers_test.go | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/traffic_ops/testing/api/v3/servers_test.go 
b/traffic_ops/testing/api/v3/servers_test.go
index 17d67e0..89beaa1 100644
--- a/traffic_ops/testing/api/v3/servers_test.go
+++ b/traffic_ops/testing/api/v3/servers_test.go
@@ -740,12 +740,11 @@ func UniqueIPProfileTestServers(t *testing.T) {
        }
        xmppId := "unique"
        var server tc.ServerV30
-       for _, s := range serversResp.Response {
-               if len(s.Interfaces) >= 1 && s.Interfaces[0].Monitor {
-                       server = s
-                       break
-               }
+       if len(serversResp.Response) == 0 {
+               t.Fatalf("no servers in response, quitting")
        }
+       server = serversResp.Response[0]
+
        _, _, err = TOSession.CreateServerWithHdr(tc.ServerV30{
                CommonServerProperties: tc.CommonServerProperties{
                        Cachegroup: server.Cachegroup,
@@ -789,7 +788,7 @@ func UniqueIPProfileTestServers(t *testing.T) {
                if interf.Monitor {
                        for j, ip := range interf.IPAddresses {
                                if ip.ServiceAddress {
-                                       
server.Interfaces[i].IPAddresses[j].Address = "127.0.0.1/24"
+                                       
server.Interfaces[i].IPAddresses[j].Address = "127.0.0.5/24"
                                        changed = true
                                }
                        }

Reply via email to