You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2017/04/19 21:45:45 UTC

[2/8] incubator-trafficcontrol git commit: fix test to TrafficMonitor config test to compare profile objects differently due to changes in object

fix test to TrafficMonitor config test to compare profile objects differently due to changes in object


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/d177bf20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/d177bf20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/d177bf20

Branch: refs/heads/master
Commit: d177bf206a9add631d7f7178192720b70b50c118
Parents: 26a5322
Author: David Neuman <da...@gmail.com>
Authored: Mon Apr 17 10:33:45 2017 -0600
Committer: Jeremy Mitchell <mi...@gmail.com>
Committed: Wed Apr 19 15:45:00 2017 -0600

----------------------------------------------------------------------
 .../integration/traffic_monitor_config_test.go     | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/d177bf20/traffic_ops/client/tests/integration/traffic_monitor_config_test.go
----------------------------------------------------------------------
diff --git a/traffic_ops/client/tests/integration/traffic_monitor_config_test.go b/traffic_ops/client/tests/integration/traffic_monitor_config_test.go
index 9c23eb8..e7a8433 100644
--- a/traffic_ops/client/tests/integration/traffic_monitor_config_test.go
+++ b/traffic_ops/client/tests/integration/traffic_monitor_config_test.go
@@ -88,8 +88,23 @@ func TestTrafficMonitorConfig(t *testing.T) {
 	for _, apiProfile := range apiTMConfig.Profiles {
 		match := false
 		for _, clientProfile := range clientTMConfig.Profiles {
-			if apiProfile == clientProfile {
+			if apiProfile.Name == clientProfile.Name {
 				match = true
+				if apiProfile.Parameters.HealthConnectionTimeout != clientProfile.Parameters.HealthConnectionTimeout {
+					t.Errorf("Prof.Param.HealthConnTimeout -- Expected %v got %v", apiProfile.Parameters.HealthConnectionTimeout, clientProfile.Parameters.HealthConnectionTimeout)
+				}
+				if apiProfile.Parameters.HealthPollingURL != clientProfile.Parameters.HealthPollingURL {
+					t.Errorf("Prof.Param.HealthPollURL -- Expected %v got %v", apiProfile.Parameters.HealthPollingURL, clientProfile.Parameters.HealthPollingURL)
+				}
+				if apiProfile.Parameters.HistoryCount != clientProfile.Parameters.HistoryCount {
+					t.Errorf("Prof.Param.HistCount -- Expected %v got %v", apiProfile.Parameters.HistoryCount, clientProfile.Parameters.HistoryCount)
+				}
+				if apiProfile.Parameters.MinFreeKbps != clientProfile.Parameters.MinFreeKbps {
+					t.Errorf("Prof.Param.MinFreeKbps -- Expected %v got %v", apiProfile.Parameters.MinFreeKbps, clientProfile.Parameters.MinFreeKbps)
+				}
+				if len(apiProfile.Parameters.Thresholds) != len(clientProfile.Parameters.Thresholds) {
+					t.Errorf("Len Prof.Param.Thresholds -- Expected %v got %v", len(apiProfile.Parameters.Thresholds), len(clientProfile.Parameters.Thresholds))
+				}
 			}
 		}
 		if !match {