ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [3/4] ambari git commit: AMBARI-12290. All install tasks fail on non-root due to incorectly working conf-select (aonishuk)
Date Mon, 06 Jul 2015 12:35:37 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.2/SPARK/test_spark_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/SPARK/test_spark_client.py b/ambari-server/src/test/python/stacks/2.2/SPARK/test_spark_client.py
index cbff0aa..deec6d6 100644
--- a/ambari-server/src/test/python/stacks/2.2/SPARK/test_spark_client.py
+++ b/ambari-server/src/test/python/stacks/2.2/SPARK/test_spark_client.py
@@ -140,10 +140,11 @@ class TestSparkClient(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'spark-client', version),
sudo=True)
     self.assertNoMoreResources()
 
-    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(1, mocks_dict['call'].call_count)
+    self.assertEquals(1, mocks_dict['checked_call'].call_count)
     self.assertEquals(
-      "conf-select create-conf-dir --package spark --stack-version 2.3.0.0-1234 --conf-version
0",
-       mocks_dict['call'].call_args_list[0][0][0])
+      ('conf-select', 'set-conf-dir', '--package', 'spark', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
+       mocks_dict['checked_call'].call_args_list[0][0][0])
     self.assertEquals(
-      "conf-select set-conf-dir --package spark --stack-version 2.3.0.0-1234 --conf-version
0",
-       mocks_dict['call'].call_args_list[1][0][0])
+      ('conf-select', 'create-conf-dir', '--package', 'spark', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_client.py b/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_client.py
index 201700b..de77efb 100644
--- a/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_client.py
+++ b/ambari-server/src/test/python/stacks/2.3/MAHOUT/test_mahout_client.py
@@ -91,7 +91,9 @@ class TestMahoutClient(RMFTestCase):
       call_mocks = itertools.cycle([(0, None)]),
       mocks_dict = mocks_dict)
 
-    self.assertResourceCalled('Execute', ('hdp-select', 'set', 'mahout-client', '2.3.0.0-1234'),
sudo=True)
+    self.assertResourceCalled('Execute', ('hdp-select', 'set', 'mahout-client', '2.3.0.0-1234'),
+        sudo = True,
+    )
     self.assertNoMoreResources()
 
     import sys
@@ -99,20 +101,21 @@ class TestMahoutClient(RMFTestCase):
     self.assertEquals("/usr/hdp/2.3.0.0-1234/hadoop/conf",
       sys.modules["params"].hadoop_conf_dir)
 
-    self.assertEquals(6, mocks_dict['call'].call_count)
+    self.assertEquals(3, mocks_dict['call'].call_count)
+    self.assertEquals(3, mocks_dict['checked_call'].call_count)
 
     self.assertEquals(
-      "conf-select create-conf-dir --package hadoop --stack-version 2.3.0.0-1234 --conf-version
0",
-      mocks_dict['call'].call_args_list[0][0][0])
+      ('conf-select', 'set-conf-dir', '--package', 'hadoop', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
+      mocks_dict['checked_call'].call_args_list[0][0][0])
 
     self.assertEquals(
-      "conf-select set-conf-dir --package hadoop --stack-version 2.3.0.0-1234 --conf-version
0",
-      mocks_dict['call'].call_args_list[1][0][0])
+      ('conf-select', 'create-conf-dir', '--package', 'hadoop', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
+      mocks_dict['call'].call_args_list[0][0][0])
 
     self.assertEquals(
-      "conf-select create-conf-dir --package mahout --stack-version 2.3.0.0-1234 --conf-version
0",
-      mocks_dict['call'].call_args_list[2][0][0])
+      ('conf-select', 'set-conf-dir', '--package', 'mahout', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
+      mocks_dict['checked_call'].call_args_list[1][0][0])
 
     self.assertEquals(
-      "conf-select set-conf-dir --package mahout --stack-version 2.3.0.0-1234 --conf-version
0",
-      mocks_dict['call'].call_args_list[3][0][0])
+      ('conf-select', 'create-conf-dir', '--package', 'mahout', '--stack-version', '2.3.0.0-1234',
'--conf-version', '0'),
+      mocks_dict['call'].call_args_list[1][0][0])


Mime
View raw message