ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-14863. Oozie should update war after adding Falcon (aonishuk)
Date Wed, 23 Mar 2016 16:10:20 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7e1815db5 -> 2a5f4f810


AMBARI-14863. Oozie should update war after adding Falcon (aonishuk)


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

Branch: refs/heads/trunk
Commit: 2a5f4f810326efe1eb250eda067914b6952c5828
Parents: 7e1815d
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Mar 23 18:10:19 2016 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Mar 23 18:10:19 2016 +0200

----------------------------------------------------------------------
 .../libraries/functions/oozie_prepare_war.py    | 99 ++++++++++++++++++++
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py    | 79 +---------------
 .../package/scripts/oozie_server_upgrade.py     |  3 +-
 .../4.0.0.2.0/package/scripts/params_linux.py   |  1 +
 .../main/resources/scripts/Ambaripreupload.py   | 82 ++--------------
 .../stacks/2.0.6/OOZIE/test_oozie_server.py     |  8 +-
 6 files changed, 114 insertions(+), 158 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5f4f81/ambari-common/src/main/python/resource_management/libraries/functions/oozie_prepare_war.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/oozie_prepare_war.py
b/ambari-common/src/main/python/resource_management/libraries/functions/oozie_prepare_war.py
new file mode 100644
index 0000000..725d0ee
--- /dev/null
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/oozie_prepare_war.py
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+
+import os
+
+from resource_management.core.logger import Logger
+from resource_management.core import shell
+from resource_management.core.exceptions import Fail
+from resource_management.core.resources.system import File
+from resource_management.libraries.functions import format
+from resource_management.libraries.functions.get_user_call_output import get_user_call_output
+
+def prepare_war(params):
+  """
+  Attempt to call prepare-war command if the marker files don't exist or their content doesn't
equal the expected.
+  The marker file for a command is stored in <stack-root>/current/oozie-server/.prepare_war_cmd
+  The marker file for a content of libext folder is stored in <stack-root>/current/oozie-server/.war_libext_content
+  """
+
+  prepare_war_cmd_file = format("{oozie_home}/.prepare_war_cmd")
+  libext_content_file = format("{oozie_home}/.war_libext_content")
+  list_libext_command = format("ls -l {oozie_libext_dir}") + " | awk '{print $9, $5}' | awk
'NF > 0'"
+
+  # DON'T CHANGE THE VALUE SINCE IT'S USED TO DETERMINE WHETHER TO RUN THE COMMAND OR NOT
BY READING THE MARKER FILE.
+  # Oozie tmp dir should be /var/tmp/oozie and is already created by a function above.
+  command = format("cd {oozie_tmp_dir} && {oozie_setup_sh} prepare-war {oozie_secure}").strip()
+  # oozie_setup_sh and oozie_setup_sh_current are different during Ambaripreupload
+  command_to_file = format("cd {oozie_tmp_dir} && {oozie_setup_sh_current} prepare-war
{oozie_secure}").strip()
+
+  run_prepare_war = False
+  if os.path.exists(prepare_war_cmd_file):
+    cmd = ""
+    with open(prepare_war_cmd_file, "r") as f:
+      cmd = f.readline().strip()
+
+    if command_to_file != cmd:
+      run_prepare_war = True
+      Logger.info(format("Will run prepare war cmd since marker file {prepare_war_cmd_file}
has contents which differ.\n" \
+                         "Expected: {command_to_file}.\nActual: {cmd}."))
+  else:
+    run_prepare_war = True
+    Logger.info(format("Will run prepare war cmd since marker file {prepare_war_cmd_file}
is missing."))
+
+  return_code, libext_content, error_output = get_user_call_output(list_libext_command, user=params.oozie_user)
+  libext_content = libext_content.strip()
+
+  if run_prepare_war == False:
+    if os.path.exists(libext_content_file):
+      old_content = ""
+      with open(libext_content_file, "r") as f:
+        old_content = f.read().strip()
+
+      if libext_content != old_content:
+        run_prepare_war = True
+        Logger.info(format("Will run prepare war cmd since marker file {libext_content_file}
has contents which differ.\n" \
+                           "Content of the folder {oozie_libext_dir} changed."))
+    else:
+      run_prepare_war = True
+      Logger.info(format("Will run prepare war cmd since marker file {libext_content_file}
is missing."))
+
+  if run_prepare_war:
+    # Time-consuming to run
+    return_code, output = shell.call(command, user=params.oozie_user)
+    if output is None:
+      output = ""
+
+    if return_code != 0 or "New Oozie WAR file with added".lower() not in output.lower():
+      message = "Unexpected Oozie WAR preparation output {0}".format(output)
+      Logger.error(message)
+      raise Fail(message)
+
+    # Generate marker files
+    File(prepare_war_cmd_file,
+         content=command_to_file,
+         mode=0644,
+         )
+    File(libext_content_file,
+         content=libext_content,
+         mode=0644,
+         )
+  else:
+    Logger.info(format("No need to run prepare-war since marker file {prepare_war_cmd_file}
already exists."))

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5f4f81/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
index 5587380..3b01802 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie.py
@@ -26,15 +26,12 @@ from resource_management.core.source import InlineTemplate
 from resource_management.core.source import Template
 from resource_management.libraries.functions.format import format
 from resource_management.libraries.functions.version import compare_versions
-from resource_management.libraries.functions.get_user_call_output import get_user_call_output
+from resource_management.libraries.functions.oozie_prepare_war import prepare_war
 from resource_management.libraries.resources.xml_config import XmlConfig
 from resource_management.libraries.script.script import Script
 from resource_management.core.resources.packaging import Package
 from resource_management.core.shell import as_user
 from resource_management.core.shell import as_sudo
-from resource_management.core import shell
-from resource_management.core.exceptions import Fail
-from resource_management.core.logger import Logger
 
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from ambari_commons import OSConst
@@ -197,78 +194,6 @@ def oozie_ownership():
     group = params.user_group
   )
 
-
-def prepare_war():
-  """
-  Attempt to call prepare-war command if the marker files don't exist or their content doesn't
equal the expected.
-  The marker file for a command is stored in <stack-root>/current/oozie-server/.prepare_war_cmd
-  The marker file for a content of libext folder is stored in <stack-root>/current/oozie-server/.war_libext_content
-  """
-  import params
-
-  prepare_war_cmd_file = format("{oozie_home}/.prepare_war_cmd")
-  libext_content_file = format("{oozie_home}/.war_libext_content")
-  list_libext_command = format("ls -l {oozie_libext_dir}") + " | awk '{print $9, $5}' | awk
'NF > 0'"
-
-  # DON'T CHANGE THE VALUE SINCE IT'S USED TO DETERMINE WHETHER TO RUN THE COMMAND OR NOT
BY READING THE MARKER FILE.
-  # Oozie tmp dir should be /var/tmp/oozie and is already created by a function above.
-  command = format("cd {oozie_tmp_dir} && {oozie_setup_sh} prepare-war {oozie_secure}")
-  command = command.strip()
-
-  run_prepare_war = False
-  if os.path.exists(prepare_war_cmd_file):
-    cmd = ""
-    with open(prepare_war_cmd_file, "r") as f:
-      cmd = f.readline().strip()
-
-    if command != cmd:
-      run_prepare_war = True
-      Logger.info(format("Will run prepare war cmd since marker file {prepare_war_cmd_file}
has contents which differ.\n" \
-      "Expected: {command}.\nActual: {cmd}."))
-  else:
-    run_prepare_war = True
-    Logger.info(format("Will run prepare war cmd since marker file {prepare_war_cmd_file}
is missing."))
-
-  return_code, libext_content, error_output = get_user_call_output(list_libext_command, user=params.oozie_user)
-  libext_content = libext_content.strip()
-
-  if run_prepare_war == False:
-    if os.path.exists(libext_content_file):
-      old_content = ""
-      with open(libext_content_file, "r") as f:
-        old_content = f.read().strip()
-
-      if libext_content != old_content:
-        run_prepare_war = True
-        Logger.info(format("Will run prepare war cmd since marker file {libext_content_file}
has contents which differ.\n" \
-                           "Content of the folder {oozie_libext_dir} changed."))
-    else:
-      run_prepare_war = True
-      Logger.info(format("Will run prepare war cmd since marker file {libext_content_file}
is missing."))
-
-  if run_prepare_war:
-    # Time-consuming to run
-    return_code, output = shell.call(command, user=params.oozie_user)
-    if output is None:
-      output = ""
-
-    if return_code != 0 or "New Oozie WAR file with added".lower() not in output.lower():
-      message = "Unexpected Oozie WAR preparation output {0}".format(output)
-      Logger.error(message)
-      raise Fail(message)
-
-    # Generate marker files
-    File(prepare_war_cmd_file,
-         content=command,
-         mode=0644,
-    )
-    File(libext_content_file,
-         content=libext_content,
-         mode=0644,
-    )
-  else:
-    Logger.info(format("No need to run prepare-war since marker file {prepare_war_cmd_file}
already exists."))
-
 def oozie_server_specific():
   import params
   
@@ -337,7 +262,7 @@ def oozie_server_specific():
       not_if  = no_op_test,
     )
 
-  prepare_war()
+  prepare_war(params)
 
   File(hashcode_file,
        mode = 0644,

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5f4f81/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
index d26b89d..2db3672 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_server_upgrade.py
@@ -33,6 +33,7 @@ from resource_management.libraries.functions import compare_versions
 from resource_management.libraries.functions import stack_select
 from resource_management.libraries.functions import format_stack_version
 from resource_management.libraries.functions import tar_archive
+from resource_management.libraries.functions.oozie_prepare_war import prepare_war
 from resource_management.libraries.script.script import Script
 
 import oozie
@@ -199,7 +200,7 @@ class OozieUpgrade(Script):
       command = format("{kinit_path_local} -kt {oozie_keytab} {oozie_principal_with_host}")
       Execute(command, user=params.oozie_user, logoutput=True)
 
-    oozie.prepare_war()
+    prepare_war(params)
 
 
   def upgrade_oozie_database_and_sharelib(self, env):

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5f4f81/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
index f92d90c..61cbd8c 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py
@@ -191,6 +191,7 @@ if https_port is not None:
   else:
     oozie_base_url = oozie_base_url.replace(str(parsed_url.port), str(https_port))
 
+oozie_setup_sh_current = oozie_setup_sh
 
 hdfs_site = config['configurations']['hdfs-site']
 fs_root = config['configurations']['core-site']['fs.defaultFS']

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5f4f81/ambari-server/src/main/resources/scripts/Ambaripreupload.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
index cbec3cf..aff33d1 100644
--- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py
+++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
@@ -40,7 +40,7 @@ from resource_management.core.logger import Logger
 from resource_management.core.resources.system import Execute
 from resource_management.libraries.functions.default import default
 from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions.get_user_call_output import get_user_call_output
+from resource_management.libraries.functions.oozie_prepare_war import prepare_war
 from resource_management.libraries.resources.hdfs_resource import HdfsResource
 from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop
 from resource_management import Script
@@ -147,6 +147,11 @@ with Environment() as env:
     })
     fs_default = get_fs_root()
     oozie_secure = ''
+    oozie_home="/usr/hdp/" + stack_version + "/oozie"
+    oozie_setup_sh=format("/usr/hdp/" + stack_version + "/oozie/bin/oozie-setup.sh")
+    oozie_setup_sh_current="/usr/hdp/current/oozie-server/bin/oozie-setup.sh"
+    oozie_tmp_dir = "/var/tmp/oozie"
+    oozie_libext_dir = "/usr/hdp/" + stack_version + "/oozie/libext"
     oozie_env_sh_template = \
   '''
   #!/bin/bash
@@ -279,12 +284,9 @@ with Environment() as env:
   env.set_params(params)
   hadoop_conf_dir = params.hadoop_conf_dir
    
-  oozie_libext_dir = format("/usr/hdp/{stack_version}/oozie/libext")
+  oozie_libext_dir = params.oozie_libext_dir
   sql_driver_filename = os.path.basename(SQL_DRIVER_PATH)
-  oozie_home=format("/usr/hdp/{stack_version}/oozie")
-  oozie_setup_sh=format("/usr/hdp/{stack_version}/oozie/bin/oozie-setup.sh")
-  oozie_setup_sh_current="/usr/hdp/current/oozie-server/bin/oozie-setup.sh"
-  oozie_tmp_dir = "/var/tmp/oozie"
+  oozie_home=params.oozie_home
   configure_cmds = []
   configure_cmds.append(('tar','-xvf', oozie_home + '/oozie-sharelib.tar.gz','-C', oozie_home))
   configure_cmds.append(('cp', "/usr/share/HDP-oozie/ext-2.2.zip", SQL_DRIVER_PATH, oozie_libext_dir))
@@ -309,74 +311,8 @@ with Environment() as env:
        mode = 0644,
   )
   
-  ###############################################
-  # PREPARE-WAR [BEGIN]
-  ###############################################
-  prepare_war_cmd_file = format("{oozie_home}/.prepare_war_cmd")
-  libext_content_file = format("{oozie_home}/.war_libext_content")
-  list_libext_command = format("ls -l {oozie_libext_dir}") + " | awk '{print $9, $5}' | awk
'NF > 0'"
+  prepare_war(params)
 
-  # DON'T CHANGE THE VALUE SINCE IT'S USED TO DETERMINE WHETHER TO RUN THE COMMAND OR NOT
BY READING THE MARKER FILE.
-  # Oozie tmp dir should be /var/tmp/oozie and is already created by a function above.
-  command = format("cd {oozie_tmp_dir} && {oozie_setup_sh} prepare-war {oozie_secure}
")
-  command_to_file = format("cd {oozie_tmp_dir} && {oozie_setup_sh_current} prepare-war
{oozie_secure} ").strip()
-
-  run_prepare_war = False
-  if os.path.exists(prepare_war_cmd_file):
-    cmd = ""
-    with open(prepare_war_cmd_file, "r") as f:
-      cmd = f.readline().strip()
-
-    if command_to_file != cmd:
-      run_prepare_war = True
-      Logger.info(format("Will run prepare war cmd since marker file {prepare_war_cmd_file}
has contents which differ.\n" \
-      "Expected: {command_to_file}.\nActual: {cmd}."))
-  else:
-    run_prepare_war = True
-    Logger.info(format("Will run prepare war cmd since marker file {prepare_war_cmd_file}
is missing."))
-
-  return_code, libext_content, error_output = get_user_call_output(list_libext_command, user=params.oozie_user)
-  libext_content = libext_content.strip()
-
-  if run_prepare_war == False:
-    if os.path.exists(libext_content_file):
-      old_content = ""
-      with open(libext_content_file, "r") as f:
-        old_content = f.read().strip()
-
-      if libext_content != old_content:
-        run_prepare_war = True
-        Logger.info(format("Will run prepare war cmd since marker file {libext_content_file}
has contents which differ.\n" \
-                           "Content of the folder {oozie_libext_dir} changed."))
-    else:
-      run_prepare_war = True
-      Logger.info(format("Will run prepare war cmd since marker file {libext_content_file}
is missing."))
-
-  if run_prepare_war:
-    # Time-consuming to run
-    return_code, output = shell.call(command, user=params.oozie_user)
-    if output is None:
-      output = ""
-
-    if return_code != 0 or "New Oozie WAR file with added".lower() not in output.lower():
-      message = "Unexpected Oozie WAR preparation output {0}".format(output)
-      Logger.error(message)
-      raise Fail(message)
-
-    # Generate marker files
-    File(prepare_war_cmd_file,
-         content=command_to_file,
-         mode=0644,
-         )
-    File(libext_content_file,
-         content=libext_content,
-         mode=0644,
-         )
-  else:
-    Logger.info(format("No need to run prepare-war since marker file {prepare_war_cmd_file}
already exists."))
-  ###############################################
-  # PREPARE-WAR END [BEGIN]
-  ###############################################
   oozie_shared_lib = format("/usr/hdp/{stack_version}/oozie/share")
   oozie_user = 'oozie'
   oozie_hdfs_user_dir = format("{hdfs_path_prefix}/user/{oozie_user}")

http://git-wip-us.apache.org/repos/asf/ambari/blob/2a5f4f81/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 ba61b3d..ef97d20 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
@@ -30,6 +30,7 @@ import tempfile
 @patch("platform.linux_distribution", new = MagicMock(return_value="Linux"))
 @patch.object(WebHDFSUtil, "run_command", new=MagicMock(return_value={}))
 @patch.object(tempfile, "gettempdir", new=MagicMock(return_value="/tmp"))
+@patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new=MagicMock(return_value=(0, 'ext-2.2.zip', '')))
 class TestOozieServer(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "OOZIE/4.0.0.2.0/package"
   STACK_VERSION = "2.0.6"
@@ -40,7 +41,6 @@ class TestOozieServer(RMFTestCase):
     self.maxDiff = None
 
   @patch.object(shell, "call")
-  @patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new=MagicMock(return_value=(0, 'ext-2.2.zip', '')))
   @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True]))
   def test_configure_default(self, call_mocks):
     call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added"))
@@ -56,7 +56,6 @@ class TestOozieServer(RMFTestCase):
     self.assertNoMoreResources()
 
   @patch.object(shell, "call")
-  @patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new=MagicMock(return_value=(0, 'ext-2.2.zip', '')))
   @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, False, True]))
   def test_configure_default_mysql(self, call_mocks):
     call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added"))
@@ -279,7 +278,6 @@ class TestOozieServer(RMFTestCase):
     )
 
   @patch.object(shell, "call")
-  @patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new=MagicMock(return_value=(0, 'ext-2.2.zip', '')))
   @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, False, True]))
   def test_configure_existing_sqla(self, call_mocks):
     call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added"))
@@ -508,7 +506,6 @@ class TestOozieServer(RMFTestCase):
 
   @patch.object(shell, "call")
   @patch("os.path.isfile")
-  @patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new=MagicMock(return_value=(0, 'ext-2.2.zip', '')))
   @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True]))
   def test_start_default(self, isfile_mock, call_mocks):
     isfile_mock.return_value = True
@@ -588,7 +585,6 @@ class TestOozieServer(RMFTestCase):
     self.assertNoMoreResources()
 
   @patch.object(shell, "call")
-  @patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new=MagicMock(return_value=(0, 'ext-2.2.zip', '')))
   @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True]))
   def test_configure_secured(self, call_mocks):
     call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added"))
@@ -605,7 +601,6 @@ class TestOozieServer(RMFTestCase):
 
   @patch.object(shell, "call")
   @patch("os.path.isfile")
-  @patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new=MagicMock(return_value=(0, 'ext-2.2.zip', '')))
   @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True]))
   def test_start_secured(self, isfile_mock, call_mocks):
     isfile_mock.return_value = True
@@ -1077,7 +1072,6 @@ class TestOozieServer(RMFTestCase):
     )
 
   @patch.object(shell, "call")
-  @patch("resource_management.libraries.functions.get_user_call_output.get_user_call_output",
new=MagicMock(return_value=(0, 'ext-2.2.zip', '')))
   @patch('os.path.exists', new=MagicMock(side_effect = [False, True, False, True]))
   def test_configure_default_hdp22(self, call_mocks):
     call_mocks = MagicMock(return_value=(0, "New Oozie WAR file with added"))


Mime
View raw message