From b2993e3b27ba64d1359cbc15e5d6cc8d9f49894a Mon Sep 17 00:00:00 2001 From: Michael Hoppal <54542891+mhoppa@users.noreply.github.com> Date: Thu, 30 Jan 2020 12:18:21 -0700 Subject: [PATCH] Fix API tests for header rewrite (#4355) * Fix API tests for header rewrite * Better approach :) (cherry picked from commit 24b1e84e6e45edcb06e66394a6d1a96f66fd0d11) --- 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 e9db51eca8..4f05eb595c 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 }