You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2014/06/13 17:27:17 UTC

git commit: Revert "AMBARI-6064. Server unittests should remove temporary files (aonishuk)"

Repository: ambari
Updated Branches:
  refs/heads/trunk 05638be17 -> d2cc6b31c


Revert "AMBARI-6064. Server unittests should remove temporary files (aonishuk)"

This reverts commit b33ec74ed9bcb10b290657f1eb27f7ba493ec2a6.


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

Branch: refs/heads/trunk
Commit: d2cc6b31cd74a1321f70e69829c0b4de98f9cb85
Parents: 05638be
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Fri Jun 13 18:24:28 2014 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Fri Jun 13 18:27:06 2014 +0300

----------------------------------------------------------------------
 ambari-server/src/test/python/TestAmbariServer.py | 7 -------
 ambari-server/src/test/python/TestOSCheck.py      | 4 ----
 2 files changed, 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d2cc6b31/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 ea3a1f5..f169468 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -24,7 +24,6 @@ from mock.mock import patch
 from mock.mock import MagicMock
 from mock.mock import create_autospec
 import os, errno, tempfile
-import glob
 import signal
 import stat
 import datetime
@@ -3568,8 +3567,6 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
     self.assertEquals(result, 0)
 
     os.unlink(fn2)
-    os.unlink(ambari_server.AMBARI_PROPERTIES_RPMSAVE_FILE
-              + '.' + timestamp.strftime('%Y%m%d%H%M%S'))
 
     #if ambari.properties file is absent then "ambari-server upgrade" should
     # fail
@@ -3578,8 +3575,6 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
 
     result = ambari_server.update_ambari_properties()
     self.assertNotEquals(result, 0)
-    os.unlink(os.path.join(tempfile.gettempdir(),'password.dat'))
-    os.unlink(fn)
 
   @patch.object(ambari_server.Properties, '__init__')
   @patch.object(ambari_server, 'search_file')
@@ -3633,8 +3628,6 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
     self.assertEqual(value, "root")
 
     os.unlink(fn2)
-    prev_conf_file = glob.glob(ambari_server.AMBARI_PROPERTIES_RPMSAVE_FILE+'*')
-    os.unlink(prev_conf_file[0])
 
 
   @patch.object(ambari_server, 'verify_setup_allowed')

http://git-wip-us.apache.org/repos/asf/ambari/blob/d2cc6b31/ambari-server/src/test/python/TestOSCheck.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/TestOSCheck.py b/ambari-server/src/test/python/TestOSCheck.py
index 2bbc07b..7a29ec3 100644
--- a/ambari-server/src/test/python/TestOSCheck.py
+++ b/ambari-server/src/test/python/TestOSCheck.py
@@ -21,7 +21,6 @@ limitations under the License.
 import platform
 import datetime
 import os
-import glob
 import errno
 import tempfile
 import sys
@@ -212,9 +211,6 @@ class TestOSCheck(TestCase):
     # Command should not fail if *.rpmsave file is missing
     result = ambari_server.update_ambari_properties()
     self.assertEquals(result, 0)
-    os.unlink(fn2)
-    prev_conf_file = glob.glob(ambari_server.AMBARI_PROPERTIES_RPMSAVE_FILE+'*')
-    os.unlink(prev_conf_file[0])
 
   @patch("platform.linux_distribution")
   def test_os_type_check(self, mock_linux_distribution):