Переглянути джерело

AMBARI-3217. ambari-server unit tests produce leave behind an ambari.properties file within the enlistment.

Sumit Mohanty 11 роки тому
батько
коміт
3cf02594eb
1 змінених файлів з 2 додано та 5 видалено
  1. 2 5
      ambari-server/src/test/python/TestAmbariServer.py

+ 2 - 5
ambari-server/src/test/python/TestAmbariServer.py

@@ -4051,7 +4051,8 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
   @patch.object(ambari_server, "store_password_file")
   @patch.object(ambari_server, "store_password_file")
   @patch("sys.exit")
   @patch("sys.exit")
   @patch('__builtin__.raw_input')
   @patch('__builtin__.raw_input')
-  def test_ambariServerSetupWithCustomDbName(self, raw_input, exit_mock, store_password_file_mock, get_is_secure_mock, setup_db_mock, is_root_mock, is_local_database_mock,
+  def test_ambariServerSetupWithCustomDbName(self, raw_input, exit_mock, store_password_file_mock,
+                                              get_is_secure_mock, setup_db_mock, is_root_mock, is_local_database_mock,
                                              check_selinux_mock, check_jdbc_drivers_mock, check_ambari_user_mock,
                                              check_selinux_mock, check_jdbc_drivers_mock, check_ambari_user_mock,
                                              check_iptables_mock, check_postgre_up_mock, configure_postgres_mock,
                                              check_iptables_mock, check_postgre_up_mock, configure_postgres_mock,
                                              download_jdk_mock, configure_os_settings_mock, get_YN_input,
                                              download_jdk_mock, configure_os_settings_mock, get_YN_input,
@@ -4088,10 +4089,6 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
       f.write("server.jdbc.database=oldDBName")
       f.write("server.jdbc.database=oldDBName")
     f.close()
     f.close()
 
 
-    with open(ambari_server.AMBARI_PROPERTIES_FILE, "w") as f:
-      f.write("server.jdbc.database=oldDBName")
-    f.close()
-
     os.environ[ambari_server.AMBARI_CONF_VAR] = tempdir
     os.environ[ambari_server.AMBARI_CONF_VAR] = tempdir
 
 
     try:
     try: