ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [4/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:38 GMT
AMBARI-12290. All install tasks fail on non-root due to incorectly working conf-select (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: 442942ceb2fd55ccc66d29a37c333da43e8ee760
Parents: 2dd5ce0
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Jul 6 15:35:24 2015 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Jul 6 15:35:24 2015 +0300

----------------------------------------------------------------------
 .../core/providers/system.py                    |   4 +
 .../libraries/functions/conf_select.py          |  16 +-
 .../scripts/shared_initialization.py            |  33 ++--
 .../stacks/2.0.6/HBASE/test_hbase_client.py     |  19 +-
 .../stacks/2.0.6/HBASE/test_hbase_master.py     |  12 +-
 .../2.0.6/HBASE/test_hbase_regionserver.py      |  11 +-
 .../2.0.6/HBASE/test_phoenix_queryserver.py     |   6 +
 .../python/stacks/2.0.6/HDFS/test_datanode.py   |  11 +-
 .../stacks/2.0.6/HDFS/test_hdfs_client.py       |  11 +-
 .../stacks/2.0.6/HDFS/test_journalnode.py       |   8 +-
 .../python/stacks/2.0.6/HDFS/test_namenode.py   |  11 +-
 .../stacks/2.0.6/HIVE/test_hive_client.py       |  19 +-
 .../stacks/2.0.6/HIVE/test_hive_server.py       |  11 +-
 .../stacks/2.0.6/HIVE/test_webhcat_server.py    |  12 +-
 .../stacks/2.0.6/OOZIE/test_oozie_client.py     |  11 +-
 .../stacks/2.0.6/OOZIE/test_oozie_server.py     |  13 +-
 .../python/stacks/2.0.6/PIG/test_pig_client.py  |  11 +-
 .../python/stacks/2.0.6/SQOOP/test_sqoop.py     |  11 +-
 .../stacks/2.0.6/YARN/test_historyserver.py     |  13 +-
 .../stacks/2.0.6/YARN/test_mapreduce2_client.py |  11 +-
 .../stacks/2.0.6/YARN/test_nodemanager.py       |  11 +-
 .../stacks/2.0.6/YARN/test_resourcemanager.py   |  11 +-
 .../stacks/2.0.6/YARN/test_yarn_client.py       |  11 +-
 .../2.0.6/ZOOKEEPER/test_zookeeper_client.py    |  11 +-
 .../2.0.6/ZOOKEEPER/test_zookeeper_server.py    |  11 +-
 .../hooks/after-INSTALL/test_after_install.py   | 191 +++++++++++++++++++
 .../stacks/2.1/FALCON/test_falcon_client.py     |  11 +-
 .../stacks/2.1/FALCON/test_falcon_server.py     |  11 +-
 .../stacks/2.1/HIVE/test_hive_metastore.py      |  11 +-
 .../stacks/2.1/STORM/test_storm_drpc_server.py  |  11 +-
 .../stacks/2.1/STORM/test_storm_nimbus.py       |  11 +-
 .../stacks/2.1/STORM/test_storm_nimbus_prod.py  |  11 +-
 .../2.1/STORM/test_storm_rest_api_service.py    |  11 +-
 .../stacks/2.1/STORM/test_storm_supervisor.py   |  11 +-
 .../2.1/STORM/test_storm_supervisor_prod.py     |  11 +-
 .../stacks/2.1/STORM/test_storm_ui_server.py    |  11 +-
 .../python/stacks/2.1/TEZ/test_tez_client.py    |  19 +-
 .../stacks/2.1/YARN/test_apptimelineserver.py   |  11 +-
 .../stacks/2.2/ACCUMULO/test_accumulo_client.py |  11 +-
 .../stacks/2.2/KAFKA/test_kafka_broker.py       |  11 +-
 .../python/stacks/2.2/KNOX/test_knox_gateway.py |  11 +-
 .../stacks/2.2/RANGER/test_ranger_admin.py      |  11 +-
 .../stacks/2.2/RANGER/test_ranger_usersync.py   |  11 +-
 .../stacks/2.2/SLIDER/test_slider_client.py     |  19 +-
 .../stacks/2.2/SPARK/test_job_history_server.py |  11 +-
 .../stacks/2.2/SPARK/test_spark_client.py       |  11 +-
 .../stacks/2.3/MAHOUT/test_mahout_client.py     |  23 ++-
 47 files changed, 506 insertions(+), 253 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-common/src/main/python/resource_management/core/providers/system.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/providers/system.py b/ambari-common/src/main/python/resource_management/core/providers/system.py
index a6f940d..db29e2c 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/system.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/system.py
@@ -137,7 +137,11 @@ class DirectoryProvider(Provider):
       
       # dead links should be followed, else we gonna have failures on trying to create directories on top of them.
       if self.resource.follow:
+        followed_links = []
         while sudo.path_lexists(path):
+          if path in followed_links:
+            raise Fail("Applying %s failed, looped symbolic links found while resolving %s" % (self.resource, path))
+          followed_links.append(path)
           path = sudo.readlink(path)
           
         if path != self.resource.path:

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
index df2b8c3..8b3f930 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
@@ -27,6 +27,7 @@ import hdp_select
 from resource_management.core import shell
 from resource_management.libraries.script.script import Script
 from resource_management.core.logger import Logger
+from resource_management.core.resources.system import Directory
 
 PACKAGE_DIRS = {
   "accumulo": {
@@ -107,7 +108,8 @@ PACKAGE_DIRS = {
   }
 }
 
-TEMPLATE = "conf-select {0} --package {1} --stack-version {2} --conf-version 0"
+def get_cmd(command, package, version):
+  return ('conf-select', command, '--package', package, '--stack-version', version, '--conf-version', '0')
 
 def _valid(stack_name, package, ver):
   if stack_name != "HDP":
@@ -132,7 +134,15 @@ def create(stack_name, package, version, dry_run = False):
 
   command = "dry-run-create" if dry_run else "create-conf-dir"
 
-  code, stdout = shell.call(TEMPLATE.format(command, package, version), logoutput=False, quiet=True)
+  code, stdout = shell.call(get_cmd(command, package, version), logoutput=False, quiet=True, sudo=True)
+
+  # take care of permissions
+  if not code and stdout and command == "create-conf-dir":
+    Directory(stdout,
+        mode=0755,
+        cd_access='a',
+        recursive=True,
+    )
 
   return stdout
 
@@ -153,7 +163,7 @@ def select(stack_name, package, version, try_create=True):
   if try_create:
     create(stack_name, package, version)
 
-  shell.call(TEMPLATE.format("set-conf-dir", package, version), logoutput=False, quiet=False)
+  shell.checked_call(get_cmd("set-conf-dir", package, version), logoutput=False, quiet=False, sudo=True)
 
 
 def get_hadoop_conf_dir(force_latest_on_upgrade=False):

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
index 8163f51..24b3ec8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py
@@ -27,7 +27,7 @@ from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions import conf_select
 from resource_management.libraries.resources.xml_config import XmlConfig
 from resource_management.libraries.script import Script
-from resource_management.core.resources.system import Directory
+from resource_management.core.resources.system import Directory, Link
 
 
 def setup_hdp_install_directory():
@@ -106,11 +106,10 @@ def _link_configs(package, version, old_conf, link_conf):
   # make backup dir and copy everything in case configure() was called after install()
   old_parent = os.path.abspath(os.path.join(old_conf, os.pardir))
   old_conf_copy = os.path.join(old_parent, "conf.install")
-  if not os.path.exists(old_conf_copy):
-    try:
-      Execute(as_sudo(["cp", "-R", "-p", old_conf, old_conf_copy]), logoutput=True)
-    except:
-      pass
+  Execute(("cp", "-R", "-p", old_conf, old_conf_copy),
+          not_if = format("test -e {old_conf_copy}"),
+          sudo = True,
+  )
 
   versioned_conf = conf_select.create("HDP", package, version, dry_run = True)
 
@@ -119,25 +118,23 @@ def _link_configs(package, version, old_conf, link_conf):
   # make new conf dir and copy everything in case configure() was called after install()
   if not os.path.exists(versioned_conf):
     conf_select.create("HDP", package, version)
-    try:
-      Execute(as_sudo(["cp", "-R", "-p", os.path.join(old_conf, "*"), versioned_conf], auto_escape=False),
-        logoutput=True)
-      Directory(versioned_conf,
-                mode=0755,
-                cd_access='a'
-      )
-    except:
-      pass
-
+    Execute(as_sudo(["cp", "-R", "-p", os.path.join(old_conf, "*"), versioned_conf], auto_escape=False),
+            only_if = format("ls {old_conf}/*")
+    )
+    
   # make /usr/hdp/<version>/hadoop/conf point to the versioned config.
   # /usr/hdp/current is already set
   conf_select.select("HDP", package, version)
 
   # no more references to /etc/[component]/conf
-  shutil.rmtree(old_conf, ignore_errors=True)
+  Directory(old_conf,
+    action="delete",
+  )
 
   # link /etc/[component]/conf -> /usr/hdp/current/[component]-client/conf
-  os.symlink(link_conf, old_conf)
+  Link(old_conf,
+    to = link_conf
+  )
       
   # should conf.install be removed?
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
index 7deb6dd..cf923f1 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_client.py
@@ -228,17 +228,18 @@ class TestHBaseClient(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hbase-client', version), sudo=True)
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-client', version), sudo=True)
 
-    self.assertEquals(5, mocks_dict['call'].call_count)
+    self.assertEquals(3, mocks_dict['call'].call_count)
+    self.assertEquals(5, mocks_dict['checked_call'].call_count)
     self.assertEquals(
-      "conf-select create-conf-dir --package hbase --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', 'hbase', '--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 hbase --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', 'hbase', '--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 hadoop --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', 'hadoop', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['checked_call'].call_args_list[3][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[3][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[1][0][0])
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
index fe1cf21..c4ff3dc 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_master.py
@@ -719,11 +719,13 @@ class TestHBaseMaster(RMFTestCase):
 
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hbase-master', version), sudo=True)
 
-    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(1, mocks_dict['call'].call_count)
+    self.assertEquals(3, mocks_dict['checked_call'].call_count)
+
     self.assertEquals(
-      "conf-select create-conf-dir --package hbase --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', 'hbase', '--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 hbase --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', 'hbase', '--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.0.6/HBASE/test_hbase_regionserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
index 65167a7..59f8a8f 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_regionserver.py
@@ -531,11 +531,12 @@ class TestHbaseRegionServer(RMFTestCase):
 
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hbase-regionserver', version), sudo=True)
 
-    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(1, mocks_dict['call'].call_count)
+    self.assertEquals(3, mocks_dict['checked_call'].call_count)
     self.assertEquals(
-      "conf-select create-conf-dir --package hbase --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', 'hbase', '--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 hbase --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', 'hbase', '--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.0.6/HBASE/test_phoenix_queryserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
index 2522925..60ff5ed 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py
@@ -398,9 +398,15 @@ class TestPhoenixQueryServer(RMFTestCase):
       classname = "PhoenixQueryServer",
       command = "pre_rolling_restart",
       config_dict = json_content,
+      call_mocks = [(0, "/etc/hbase/2.3.0.0-1234/0")],
       hdp_stack_version = self.STACK_VERSION,
       target = RMFTestCase.TARGET_COMMON_SERVICES)
 
+    self.assertResourceCalled('Directory', '/etc/hbase/2.3.0.0-1234/0',
+        recursive = True,
+        mode = 0755,
+        cd_access = 'a',
+    )
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'phoenix-server', '2.3.0.0-1234'), sudo=True)
 
     self.assertNoMoreResources()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
index 1ae9ec6..b99f53a 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_datanode.py
@@ -460,13 +460,14 @@ class TestDatanode(RMFTestCase):
 
     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 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])
 
 
   @patch('time.sleep')

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
index 502c3bb..41fd771 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_hdfs_client.py
@@ -202,13 +202,14 @@ class Test(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-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 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])
 
   def test_pre_rolling_restart(self):
     config_file = self.get_src_folder()+"/test/python/stacks/2.0.6/configs/default.json"

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
index b7e99c1..ecf4b06 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_journalnode.py
@@ -488,8 +488,8 @@ class TestJournalnode(RMFTestCase):
     self.assertNoMoreResources()
 
     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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
index 00b0e57..abce658 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
@@ -1183,13 +1183,14 @@ class TestNamenode(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-hdfs-namenode', 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 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])
 
   def test_post_rolling_restart(self):
     config_file = self.get_src_folder()+"/test/python/stacks/2.0.6/configs/default.json"

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
index 07feda0..79bcc73 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_client.py
@@ -213,16 +213,17 @@ class TestHiveClient(RMFTestCase):
                               ('hdp-select', 'set', 'hadoop-client', version), sudo=True,)
     self.assertNoMoreResources()
 
-    self.assertEquals(4, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['checked_call'].call_count)
     self.assertEquals(
-      "conf-select create-conf-dir --package hive --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', 'hive', '--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 hive --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', 'hive', '--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 hadoop --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', 'hadoop', '--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 hadoop --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', 'hadoop', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[1][0][0])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
index 914b2f1..e1d4a6f 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
@@ -920,10 +920,11 @@ From source with checksum 150f554beae04f76f814f59549dead8b"""
     )
     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 hive --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', 'hive', '--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 hive --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', 'hive', '--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.0.6/HIVE/test_webhcat_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
index fd91ed3..5dd26e4 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
@@ -360,10 +360,12 @@ class TestWebHCatServer(RMFTestCase):
                               ('hdp-select', 'set', 'hive-webhcat', 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 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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py
index 0ee81d4..4fcfb33 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_client.py
@@ -234,10 +234,11 @@ class TestOozieClient(RMFTestCase):
                               ('hdp-select', 'set', 'oozie-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 oozie --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', 'oozie', '--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 oozie --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', 'oozie', '--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.0.6/OOZIE/test_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
index 5b7d199..0ce0f20 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
@@ -997,7 +997,7 @@ class TestOozieServer(RMFTestCase):
      classname = "OozieServer", command = "pre_rolling_restart", config_dict = json_content,
      hdp_stack_version = self.UPGRADE_STACK_VERSION,
      target = RMFTestCase.TARGET_COMMON_SERVICES,
-     call_mocks = [(0, None), (0, None), (0, prepare_war_stdout)],
+     call_mocks = [(0, None), (0, prepare_war_stdout)],
      mocks_dict = mocks_dict
     )
 
@@ -1020,13 +1020,14 @@ class TestOozieServer(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'oozie-server', '2.3.0.0-1234'), sudo=True)
     self.assertNoMoreResources()
 
-    self.assertEquals(3, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(1, mocks_dict['checked_call'].call_count)
     self.assertEquals(
-      "conf-select create-conf-dir --package oozie --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', 'oozie', '--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 oozie --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', 'oozie', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
 
 
   @patch("tarfile.open")

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
index ef098b0..8825248 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
@@ -170,10 +170,11 @@ class TestPigClient(RMFTestCase):
                               ('hdp-select', 'set', 'hadoop-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 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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_sqoop.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_sqoop.py b/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_sqoop.py
index de1b483..2c0b8c8 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_sqoop.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/SQOOP/test_sqoop.py
@@ -131,10 +131,11 @@ class TestSqoop(RMFTestCase):
 
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'sqoop-client', version), sudo=True)
 
-    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 sqoop --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', 'sqoop', '--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 sqoop --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', 'sqoop', '--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.0.6/YARN/test_historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
index 7d8673f..13d9ea9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
@@ -18,7 +18,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 '''
 import json
-from mock.mock import MagicMock, call, patch
+from mock.mock import MagicMock, patch
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions import version
 from stacks.utils.RMFTestCase import *
@@ -769,10 +769,11 @@ class TestHistoryServer(RMFTestCase):
 
     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 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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py
index b1c691a..0e52264 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_client.py
@@ -407,10 +407,11 @@ class TestMapReduce2Client(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-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 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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
index e9b44e8..613ab69 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_nodemanager.py
@@ -714,10 +714,11 @@ class TestNodeManager(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-yarn-nodemanager', 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 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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py
index 9d422ed..428655b 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_resourcemanager.py
@@ -637,10 +637,11 @@ class TestResourceManager(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-yarn-resourcemanager', 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 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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py
index 1b16a7d..21fbb9d 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_client.py
@@ -576,10 +576,11 @@ class TestYarnClient(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-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 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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py b/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py
index ba87fe5..79fd74b 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_client.py
@@ -193,12 +193,13 @@ class TestZookeeperClient(RMFTestCase):
     self.assertResourceCalled('Execute',
                               ('hdp-select', 'set', 'zookeeper-client', version), sudo=True)
 
-    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 zookeeper --stack-version 2.3.0.0-3242 --conf-version 0",
-       mocks_dict['call'].call_args_list[0][0][0])
+      ('conf-select', 'set-conf-dir', '--package', 'zookeeper', '--stack-version', '2.3.0.0-3242', '--conf-version', '0'),
+       mocks_dict['checked_call'].call_args_list[0][0][0])
     self.assertEquals(
-      "conf-select set-conf-dir --package zookeeper --stack-version 2.3.0.0-3242 --conf-version 0",
-       mocks_dict['call'].call_args_list[1][0][0])
+      ('conf-select', 'create-conf-dir', '--package', 'zookeeper', '--stack-version', '2.3.0.0-3242', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
 
     self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py b/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py
index bb5f237..afc4bc7 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py
@@ -379,13 +379,14 @@ class TestZookeeperServer(RMFTestCase):
     self.assertResourceCalled('Execute',
                               ('hdp-select', 'set', 'zookeeper-server', version), sudo=True)
 
-    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 zookeeper --stack-version 2.3.0.0-3242 --conf-version 0",
-       mocks_dict['call'].call_args_list[0][0][0])
+      ('conf-select', 'set-conf-dir', '--package', 'zookeeper', '--stack-version', '2.3.0.0-3242', '--conf-version', '0'),
+       mocks_dict['checked_call'].call_args_list[0][0][0])
     self.assertEquals(
-      "conf-select set-conf-dir --package zookeeper --stack-version 2.3.0.0-3242 --conf-version 0",
-       mocks_dict['call'].call_args_list[1][0][0])
+      ('conf-select', 'create-conf-dir', '--package', 'zookeeper', '--stack-version', '2.3.0.0-3242', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
 
     self.assertNoMoreResources()
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py b/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
index 2979990..572cd11 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py
@@ -83,5 +83,196 @@ class TestHookAfterInstall(RMFTestCase):
       configurations = self.getConfig()['configurations']['core-site'],
       configuration_attributes = self.getConfig()['configuration_attributes']['core-site'],
       only_if="ls /usr/hdp/current/hadoop-client/conf")
+  
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/zookeeper/conf', '/etc/zookeeper/conf.install'),
+        not_if = 'test -e /etc/zookeeper/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/zookeeper/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/zookeeper/conf',
+        to = '/usr/hdp/current/zookeeper-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/ranger/kms/conf', '/etc/ranger/kms/conf.install'),
+        not_if = 'test -e /etc/ranger/kms/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/ranger/kms/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/ranger/kms/conf',
+        to = '/usr/hdp/current/ranger-kms/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/accumulo/conf', '/etc/accumulo/conf.install'),
+        not_if = 'test -e /etc/accumulo/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/accumulo/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/accumulo/conf',
+        to = '/usr/hdp/current/accumulo-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/phoenix/conf', '/etc/phoenix/conf.install'),
+        not_if = 'test -e /etc/phoenix/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/phoenix/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/phoenix/conf',
+        to = '/usr/hdp/current/phoenix-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/sqoop/conf', '/etc/sqoop/conf.install'),
+        not_if = 'test -e /etc/sqoop/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/sqoop/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/sqoop/conf',
+        to = '/usr/hdp/current/sqoop-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/hadoop/conf', '/etc/hadoop/conf.install'),
+        not_if = 'test -e /etc/hadoop/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/hadoop/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/hadoop/conf',
+        to = '/usr/hdp/current/hadoop-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/hive/conf', '/etc/hive/conf.install'),
+        not_if = 'test -e /etc/hive/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/hive/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/hive/conf',
+        to = '/usr/hdp/current/hive-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/kafka/conf', '/etc/kafka/conf.install'),
+        not_if = 'test -e /etc/kafka/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/kafka/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/kafka/conf',
+        to = '/usr/hdp/current/kafka-broker/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/mahout/conf', '/etc/mahout/conf.install'),
+        not_if = 'test -e /etc/mahout/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/mahout/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/mahout/conf',
+        to = '/usr/hdp/current/mahout-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/slider/conf', '/etc/slider/conf.install'),
+        not_if = 'test -e /etc/slider/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/slider/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/slider/conf',
+        to = '/usr/hdp/current/slider-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/tez/conf', '/etc/tez/conf.install'),
+        not_if = 'test -e /etc/tez/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/tez/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/tez/conf',
+        to = '/usr/hdp/current/tez-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/storm/conf', '/etc/storm/conf.install'),
+        not_if = 'test -e /etc/storm/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/storm/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/storm/conf',
+        to = '/usr/hdp/current/storm-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/oozie/conf', '/etc/oozie/conf.install'),
+        not_if = 'test -e /etc/oozie/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/oozie/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/oozie/conf',
+        to = '/usr/hdp/current/oozie-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/spark/conf', '/etc/spark/conf.install'),
+        not_if = 'test -e /etc/spark/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/spark/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/spark/conf',
+        to = '/usr/hdp/current/spark-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/falcon/conf', '/etc/falcon/conf.install'),
+        not_if = 'test -e /etc/falcon/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/falcon/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/falcon/conf',
+        to = '/usr/hdp/current/falcon-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/hbase/conf', '/etc/hbase/conf.install'),
+        not_if = 'test -e /etc/hbase/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/hbase/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/hbase/conf',
+        to = '/usr/hdp/current/hbase-client/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/ranger/kms/usersync', '/etc/ranger/kms/conf.install'),
+        not_if = 'test -e /etc/ranger/kms/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/ranger/kms/usersync',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/ranger/kms/usersync',
+        to = '/usr/hdp/current/ranger-usersync/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/knox/conf', '/etc/knox/conf.install'),
+        not_if = 'test -e /etc/knox/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/knox/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/knox/conf',
+        to = '/usr/hdp/current/knox-server/conf',
+    )
+    self.assertResourceCalled('Execute', ('cp', '-R', '-p', '/etc/ranger/admin/conf', '/etc/ranger/admin/conf.install'),
+        not_if = 'test -e /etc/ranger/admin/conf.install',
+        sudo = True,
+    )
+    self.assertResourceCalled('Directory', '/etc/ranger/admin/conf',
+        action = ['delete'],
+    )
+    self.assertResourceCalled('Link', '/etc/ranger/admin/conf',
+        to = '/usr/hdp/current/ranger-admin/conf',
+    )
 
     self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
index 8e6c142..17c6137 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
@@ -142,10 +142,11 @@ class TestFalconClient(RMFTestCase):
                               ('hdp-select', 'set', 'falcon-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 falcon --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', 'falcon', '--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 falcon --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', 'falcon', '--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.1/FALCON/test_falcon_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
index 85e99d3..087b72c 100644
--- a/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
@@ -381,10 +381,11 @@ class TestFalconServer(RMFTestCase):
                               ('hdp-select', 'set', 'falcon-server', 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 falcon --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', 'falcon', '--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 falcon --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', 'falcon', '--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.1/HIVE/test_hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
index 8d6c5c9..dc1933b 100644
--- a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
@@ -525,13 +525,14 @@ class TestHiveMetastore(RMFTestCase):
                               ('hdp-select', 'set', 'hive-metastore', 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 hive --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', 'hive', '--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 hive --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', 'hive', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
 
 
   @patch("os.path.exists")

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
index 0a0641c..283c865 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
@@ -171,13 +171,14 @@ class TestStormDrpcServer(TestStormBase):
 
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-client', '2.3.0.0-1234'), sudo=True)
 
-    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 storm --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', 'storm', '--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 storm --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', 'storm', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
 
 
   @patch("resource_management.libraries.functions.security_commons.build_expectations")

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
index 720ec82..bbcc15a 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
@@ -172,13 +172,14 @@ class TestStormNimbus(TestStormBase):
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-client', '2.3.0.0-1234'), sudo=True)
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-nimbus', '2.3.0.0-1234'), sudo=True)
 
-    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 storm --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', 'storm', '--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 storm --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', 'storm', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
     
   @patch("resource_management.libraries.functions.security_commons.build_expectations")
   @patch("resource_management.libraries.functions.security_commons.get_params_from_filesystem")

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
index d4054ca..03f33f6 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
@@ -137,10 +137,11 @@ class TestStormNimbus(TestStormBase):
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-client', '2.3.0.0-1234'), sudo=True)
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-nimbus', '2.3.0.0-1234'), sudo=True)
 
-    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 storm --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', 'storm', '--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 storm --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', 'storm', '--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.1/STORM/test_storm_rest_api_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
index f052dd5..b26913e 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
@@ -170,10 +170,11 @@ class TestStormRestApi(TestStormBase):
 
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-client', '2.3.0.0-1234'), sudo=True)
 
-    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 storm --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', 'storm', '--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 storm --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', 'storm', '--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.1/STORM/test_storm_supervisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
index 1953fa1..84fb64c 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
@@ -217,10 +217,11 @@ class TestStormSupervisor(TestStormBase):
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-client', '2.3.0.0-1234'), sudo=True)
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-supervisor', '2.3.0.0-1234'), sudo=True)
 
-    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 storm --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', 'storm', '--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 storm --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', 'storm', '--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.1/STORM/test_storm_supervisor_prod.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
index 0855317..649b716 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
@@ -186,10 +186,11 @@ class TestStormSupervisor(TestStormBase):
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-client', '2.3.0.0-1234'), sudo=True)
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-supervisor', '2.3.0.0-1234'), sudo=True)
 
-    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 storm --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', 'storm', '--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 storm --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', 'storm', '--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.1/STORM/test_storm_ui_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
index 550d2db..185c66d 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
@@ -168,13 +168,14 @@ class TestStormUiServer(TestStormBase):
 
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'storm-client', '2.3.0.0-1234'), sudo=True)
 
-    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 storm --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', 'storm', '--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 storm --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', 'storm', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
 
 
   @patch("resource_management.libraries.functions.security_commons.build_expectations")

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.1/TEZ/test_tez_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/TEZ/test_tez_client.py b/ambari-server/src/test/python/stacks/2.1/TEZ/test_tez_client.py
index eecb52c..89037eb 100644
--- a/ambari-server/src/test/python/stacks/2.1/TEZ/test_tez_client.py
+++ b/ambari-server/src/test/python/stacks/2.1/TEZ/test_tez_client.py
@@ -111,16 +111,17 @@ class TestTezClient(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-client', version), sudo=True)
     self.assertNoMoreResources()
 
-    self.assertEquals(4, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['checked_call'].call_count)
     self.assertEquals(
-      "conf-select create-conf-dir --package tez --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', 'tez', '--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 tez --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', 'tez', '--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 hadoop --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', 'hadoop', '--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 hadoop --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', 'hadoop', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[1][0][0])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py b/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
index 19888a9..cb7b06b 100644
--- a/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
+++ b/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
@@ -395,10 +395,11 @@ class TestAppTimelineServer(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'hadoop-yarn-timelineserver', 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 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])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py b/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py
index efce00d..fd97061 100644
--- a/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py
+++ b/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py
@@ -68,11 +68,12 @@ class TestAccumuloClient(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'accumulo-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 accumulo --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', 'accumulo', '--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 accumulo --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', 'accumulo', '--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.2/KAFKA/test_kafka_broker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/KAFKA/test_kafka_broker.py b/ambari-server/src/test/python/stacks/2.2/KAFKA/test_kafka_broker.py
index 6261402..3337e3f 100644
--- a/ambari-server/src/test/python/stacks/2.2/KAFKA/test_kafka_broker.py
+++ b/ambari-server/src/test/python/stacks/2.2/KAFKA/test_kafka_broker.py
@@ -135,10 +135,11 @@ class TestKafkaBroker(RMFTestCase):
                               ('hdp-select', 'set', 'kafka-broker', 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 kafka --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', 'kafka', '--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 kafka --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', 'kafka', '--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.2/KNOX/test_knox_gateway.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
index 517b90f..0c4b292 100644
--- a/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
+++ b/ambari-server/src/test/python/stacks/2.2/KNOX/test_knox_gateway.py
@@ -290,13 +290,14 @@ class TestKnoxGateway(RMFTestCase):
 
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'knox-server', version), sudo=True)
 
-    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 knox --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', 'knox', '--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 knox --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', 'knox', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
 
     self.assertTrue(2, knox_conf_tarfile.close_count)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_admin.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_admin.py b/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_admin.py
index 4662a57..24c8afe 100644
--- a/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_admin.py
+++ b/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_admin.py
@@ -184,10 +184,11 @@ class TestRangerAdmin(RMFTestCase):
 
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'ranger-admin', '2.3.0.0-1234'), sudo=True)
 
-    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 ranger-admin --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', 'ranger-admin', '--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 ranger-admin --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', 'ranger-admin', '--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.2/RANGER/test_ranger_usersync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py b/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py
index b155de2..c2b826b 100644
--- a/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py
+++ b/ambari-server/src/test/python/stacks/2.2/RANGER/test_ranger_usersync.py
@@ -147,13 +147,14 @@ class TestRangerUsersync(RMFTestCase):
                               sudo = True)
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'ranger-usersync', '2.3.0.0-1234'), sudo=True)
 
-    self.assertEquals(3, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(1, mocks_dict['checked_call'].call_count)
     self.assertEquals(
-      "conf-select create-conf-dir --package ranger-usersync --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', 'ranger-usersync', '--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 ranger-usersync --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', 'ranger-usersync', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[0][0][0])
 
   def assert_configure_default(self):
     self.assertResourceCalled('PropertiesFile', '/usr/hdp/current/ranger-usersync/install.properties',

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py b/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py
index 792388d..3af55f6 100644
--- a/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py
+++ b/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py
@@ -140,16 +140,17 @@ class TestSliderClient(RMFTestCase):
     self.assertResourceCalled("Execute", ('hdp-select', 'set', 'hadoop-client', '2.3.0.0-1234'), sudo=True)
     self.assertNoMoreResources()
 
-    self.assertEquals(4, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['call'].call_count)
+    self.assertEquals(2, mocks_dict['checked_call'].call_count)
     self.assertEquals(
-      "conf-select create-conf-dir --package slider --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', 'slider', '--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 slider --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', 'slider', '--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 hadoop --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', 'hadoop', '--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 hadoop --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', 'hadoop', '--stack-version', '2.3.0.0-1234', '--conf-version', '0'),
+       mocks_dict['call'].call_args_list[1][0][0])

http://git-wip-us.apache.org/repos/asf/ambari/blob/442942ce/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py b/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py
index 6418f18..9cf1bd1 100644
--- a/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py
+++ b/ambari-server/src/test/python/stacks/2.2/SPARK/test_job_history_server.py
@@ -297,10 +297,11 @@ class TestJobHistoryServer(RMFTestCase):
     self.assertResourceCalled('Execute', ('hdp-select', 'set', 'spark-historyserver', 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])


Mime
View raw message