ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject git commit: AMBARI-3274. Add ambari client unit test to the main mvn test target so that the unit tests are always run as part of the build. (Andrew Onischuk via mahadev)
Date Thu, 19 Sep 2013 21:37:28 GMT
Updated Branches:
  refs/heads/trunk be5914044 -> ab10b73e8


AMBARI-3274. Add ambari client unit test to the main mvn test target so that the unit tests
are always run as part of the build. (Andrew Onischuk via mahadev)


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

Branch: refs/heads/trunk
Commit: ab10b73e8c32420477d7cbd24ef69b54065ef65d
Parents: be59140
Author: Mahadev Konar <mahadev@apache.org>
Authored: Thu Sep 19 14:36:00 2013 -0700
Committer: Mahadev Konar <mahadev@apache.org>
Committed: Thu Sep 19 14:36:00 2013 -0700

----------------------------------------------------------------------
 ambari-client/pom.xml                                         | 2 +-
 .../src/main/python/ambari_client/core/http_client.py         | 7 ++++++-
 pom.xml                                                       | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ab10b73e/ambari-client/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-client/pom.xml b/ambari-client/pom.xml
index bd6b320..38d61f1 100755
--- a/ambari-client/pom.xml
+++ b/ambari-client/pom.xml
@@ -27,7 +27,7 @@
   <artifactId>ambari-client</artifactId>
   <packaging>pom</packaging>
   <version>1.3.0-SNAPSHOT</version>
-  <name>Ambari client</name>
+  <name>Ambari Client</name>
   <description>Ambari Python client</description>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ab10b73e/ambari-client/src/main/python/ambari_client/core/http_client.py
----------------------------------------------------------------------
diff --git a/ambari-client/src/main/python/ambari_client/core/http_client.py b/ambari-client/src/main/python/ambari_client/core/http_client.py
index f2d82f3..188af83 100755
--- a/ambari-client/src/main/python/ambari_client/core/http_client.py
+++ b/ambari-client/src/main/python/ambari_client/core/http_client.py
@@ -18,7 +18,12 @@
 import logging
 import posixpath
 import sys
-import pycurl
+try:
+  import pycurl
+# pycurl is not necessary for testcases, mock it
+except ImportError:
+  from mock.mock import MagicMock
+  pycurl = MagicMock() 
 import cStringIO
 import StringIO
 import pdb

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/ab10b73e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index aa856fa..5d86dc0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,6 +52,7 @@
     <module>ambari-project</module>
     <module>ambari-server</module>
     <module>ambari-agent</module>
+    <module>ambari-client</module>
   </modules>
   <build>
     <pluginManagement>


Mime
View raw message