You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2015/02/28 19:51:13 UTC
ambari git commit: AMBARI-9850. Fix TestAlerts unit test (rlevas)
Repository: ambari
Updated Branches:
refs/heads/branch-2.0.0 6aaf4557e -> b734ee714
AMBARI-9850. Fix TestAlerts unit test (rlevas)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b734ee71
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b734ee71
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b734ee71
Branch: refs/heads/branch-2.0.0
Commit: b734ee71458c025ed22f1c89f6f0052ad07c94ff
Parents: 6aaf455
Author: Robert Levas <rl...@hortonworks.com>
Authored: Sat Feb 28 13:49:52 2015 -0500
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Sat Feb 28 13:49:52 2015 -0500
----------------------------------------------------------------------
ambari-agent/src/test/python/ambari_agent/TestAlerts.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b734ee71/ambari-agent/src/test/python/ambari_agent/TestAlerts.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestAlerts.py b/ambari-agent/src/test/python/ambari_agent/TestAlerts.py
index ed95dc4..2ee47c5 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestAlerts.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestAlerts.py
@@ -508,7 +508,7 @@ class TestAlerts(TestCase):
cluster_configuration = self.__get_cluster_configuration()
self.__update_cluster_configuration(cluster_configuration, configuration)
- alert = WebAlert(definition_json, definition_json['source'])
+ alert = WebAlert(definition_json, definition_json['source'], None)
alert.set_helpers(collector, cluster_configuration)
alert.set_cluster("c1", "c6401.ambari.apache.org")
alert.collect()
@@ -524,7 +524,7 @@ class TestAlerts(TestCase):
wa_make_web_request_mock.return_value = WebResponse(500,1.234,None)
collector = AlertCollector()
- alert = WebAlert(definition_json, definition_json['source'])
+ alert = WebAlert(definition_json, definition_json['source'], None)
alert.set_helpers(collector, cluster_configuration)
alert.set_cluster("c1", "c6401.ambari.apache.org")
alert.collect()
@@ -539,7 +539,7 @@ class TestAlerts(TestCase):
wa_make_web_request_mock.return_value = WebResponse(0,0,'error message')
collector = AlertCollector()
- alert = WebAlert(definition_json, definition_json['source'])
+ alert = WebAlert(definition_json, definition_json['source'], None)
alert.set_helpers(collector, cluster_configuration)
alert.set_cluster("c1", "c6401.ambari.apache.org")
alert.collect()
@@ -560,7 +560,7 @@ class TestAlerts(TestCase):
self.__update_cluster_configuration(cluster_configuration, configuration)
collector = AlertCollector()
- alert = WebAlert(definition_json, definition_json['source'])
+ alert = WebAlert(definition_json, definition_json['source'], None)
alert.set_helpers(collector, cluster_configuration)
alert.set_cluster("c1", "c6401.ambari.apache.org")
@@ -821,7 +821,7 @@ class TestAlerts(TestCase):
self.assertEquals(alert._get_reporting_text(alert.RESULT_CRITICAL), 'Connection failed: {0} to {1}:{2}')
definition_json['source']['type'] = 'WEB'
- alert = WebAlert(definition_json, definition_json['source'])
+ alert = WebAlert(definition_json, definition_json['source'], None)
self.assertEquals(alert._get_reporting_text(alert.RESULT_OK), 'HTTP {0} response in {2:.4f} seconds')
self.assertEquals(alert._get_reporting_text(alert.RESULT_WARNING), 'HTTP {0} response in {2:.4f} seconds')
self.assertEquals(alert._get_reporting_text(alert.RESULT_CRITICAL), 'Connection failed to {1}')