You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ra...@apache.org on 2020/01/30 19:47:54 UTC

[trafficcontrol] branch 4.0.x updated: Fix API tests for header rewrite (#4355) (#4360)

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

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


The following commit(s) were added to refs/heads/4.0.x by this push:
     new e848025  Fix API tests for header rewrite (#4355) (#4360)
e848025 is described below

commit e848025d87f6206ba0adb392b83074e9b90a0e30
Author: Rawlin Peters <ra...@apache.org>
AuthorDate: Thu Jan 30 12:47:48 2020 -0700

    Fix API tests for header rewrite (#4355) (#4360)
    
    * Fix API tests for header rewrite
    
    * Better approach :)
    
    (cherry picked from commit 24b1e84e6e45edcb06e66394a6d1a96f66fd0d11)
    
    Co-authored-by: Michael Hoppal <54...@users.noreply.github.com>
---
 traffic_ops/testing/api/v14/hdr_rw_dot_config_test.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/traffic_ops/testing/api/v14/hdr_rw_dot_config_test.go b/traffic_ops/testing/api/v14/hdr_rw_dot_config_test.go
index e9db51e..4f05eb5 100644
--- a/traffic_ops/testing/api/v14/hdr_rw_dot_config_test.go
+++ b/traffic_ops/testing/api/v14/hdr_rw_dot_config_test.go
@@ -57,11 +57,13 @@ func getFirstDnsOrHttpDeliveryService(t *testing.T) *tc.DeliveryServiceNullable
 		default:
 			continue
 		}
-
+		if ds.MaxOriginConnections != nil && *ds.MaxOriginConnections > 0 {
+			continue // MaxOriginConnections adds lines to the Header Rewrite, throwing the tests (we test MaxOriginConns remap lines separately in GetTestHdrRwDotConfigMaxOriginConns).
+		}
 		return &ds
 	}
 
-	t.Errorf("Cannot test hdr_rw_dot_config with no http or dns deliveryservices: %s", err)
+	t.Errorf("Cannot test hdr_rw_dot_config with no http or dns deliveryservices without maxOriginConnections: %s", err)
 	return nil
 
 }