Repository: ambari Updated Branches: refs/heads/trunk 4bd14a966 -> 82afeb3f1
AMBARI-5061. Ambari Upgrade stack command failed. Unit test fixes. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/82afeb3f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/82afeb3f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/82afeb3f Branch: refs/heads/trunk Commit: 82afeb3f10271afe105ce64e225ffd6348f3f06b Parents: 4bd14a9 Author: Siddharth Wagle <[email protected]> Authored: Thu Mar 13 14:55:36 2014 -0700 Committer: Siddharth Wagle <[email protected]> Committed: Thu Mar 13 14:55:36 2014 -0700 ---------------------------------------------------------------------- ambari-server/src/test/python/TestAmbariServer.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/82afeb3f/ambari-server/src/test/python/TestAmbariServer.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py index a7317a9..54e4077 100644 --- a/ambari-server/src/test/python/TestAmbariServer.py +++ b/ambari-server/src/test/python/TestAmbariServer.py @@ -2763,8 +2763,9 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV self.assertTrue(get_conf_dir_mock.called) self.assertTrue(run_os_command_mock.called) run_os_command_mock.assert_called_with('/usr/lib/java/bin/java -cp /etc/conf:test:path12 ' - 'org.apache.ambari.server.upgrade.StackUpgradeHelper ' - 'updateStackId ' + json.dumps(stackIdMap) + ' > /var/log/ambari-server/ambari-server.out 2>&1') + 'org.apache.ambari.server.upgrade.StackUpgradeHelper ' + 'updateStackId ' + "'" + json.dumps(stackIdMap) + "'" + + ' > /var/log/ambari-server/ambari-server.out 2>&1') @patch.object(ambari_server, 'get_conf_dir') @patch.object(ambari_server, 'get_ambari_classpath') @@ -2785,8 +2786,9 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV self.assertTrue(get_conf_dir_mock.called) self.assertTrue(run_os_command_mock.called) run_os_command_mock.assert_called_with('/usr/lib/java/bin/java -cp /etc/conf:test:path12 ' - 'org.apache.ambari.server.upgrade.StackUpgradeHelper ' - 'updateStackId ' + json.dumps(stackIdMap) + ' > /var/log/ambari-server/ambari-server.out 2>&1') + 'org.apache.ambari.server.upgrade.StackUpgradeHelper ' + 'updateStackId ' + "'" + json.dumps(stackIdMap) + "'" + + ' > /var/log/ambari-server/ambari-server.out 2>&1') @patch.object(ambari_server, 'get_conf_dir') @patch.object(ambari_server, 'get_ambari_classpath') @@ -2807,8 +2809,9 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV self.assertTrue(get_conf_dir_mock.called) self.assertTrue(run_os_command_mock.called) run_os_command_mock.assert_called_with('/usr/lib/java/bin/java -cp /etc/conf:test:path12 ' - 'org.apache.ambari.server.upgrade.StackUpgradeHelper ' - 'updateStackId ' + json.dumps(stackIdMap) + ' > /var/log/ambari-server/ambari-server.out 2>&1') + 'org.apache.ambari.server.upgrade.StackUpgradeHelper ' + 'updateStackId ' + "'" + json.dumps(stackIdMap) + "'" + + ' > /var/log/ambari-server/ambari-server.out 2>&1') @patch.object(ambari_server, 'get_conf_dir') @@ -2853,7 +2856,8 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV self.assertTrue(run_os_command_mock.called) run_os_command_mock.assert_called_with('/usr/lib/java/bin/java -cp /etc/conf:test:path12 ' 'org.apache.ambari.server.upgrade.StackUpgradeHelper updateMetaInfo ' + - json.dumps(json_map) + ' > /var/log/ambari-server/ambari-server.out 2>&1') + "'" + json.dumps(json_map) + "'" + + ' > /var/log/ambari-server/ambari-server.out 2>&1') @patch("__builtin__.open")
