You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2015/03/25 20:15:55 UTC
ambari git commit: Ambari-10210. TestMain.test_resolve_ambari_config
fails on Mac
Repository: ambari
Updated Branches:
refs/heads/trunk ae9c18141 -> 295f4f5bc
Ambari-10210. TestMain.test_resolve_ambari_config fails on Mac
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/295f4f5b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/295f4f5b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/295f4f5b
Branch: refs/heads/trunk
Commit: 295f4f5bc50cc56df6e5263b9cdf22a73946bb55
Parents: ae9c181
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Wed Mar 25 12:15:42 2015 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Wed Mar 25 12:15:42 2015 -0700
----------------------------------------------------------------------
ambari-agent/src/test/python/ambari_agent/TestMain.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/295f4f5b/ambari-agent/src/test/python/ambari_agent/TestMain.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestMain.py b/ambari-agent/src/test/python/ambari_agent/TestMain.py
index 3bca7de..3c20997 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestMain.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestMain.py
@@ -141,9 +141,11 @@ class TestMain(unittest.TestCase):
signal_mock.assert_any_call(signal.SIGUSR1, HeartbeatHandlers.debug)
+ @patch("platform.linux_distribution")
@patch("os.path.exists")
@patch("ConfigParser.RawConfigParser.read")
- def test_resolve_ambari_config(self, read_mock, exists_mock):
+ def test_resolve_ambari_config(self, read_mock, exists_mock, platform_mock):
+ platform_mock.return_value = "Linux"
# Trying case if conf file exists
exists_mock.return_value = True
main.resolve_ambari_config()