ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fba...@apache.org
Subject ambari git commit: AMBARI-8317 Refactor the OS-dependent Ambari Server Windows components
Date Mon, 19 Jan 2015 21:43:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b285bd088 -> a902c5372


AMBARI-8317 Refactor the OS-dependent Ambari Server Windows components

Unit test fix for Ubuntu


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

Branch: refs/heads/trunk
Commit: a902c53720cfbfb8aca5f69a7a7ff579a8911d4b
Parents: b285bd0
Author: Florian Barca <fbarca@hortonworks.com>
Authored: Mon Jan 19 13:43:40 2015 -0800
Committer: Florian Barca <fbarca@hortonworks.com>
Committed: Mon Jan 19 13:43:40 2015 -0800

----------------------------------------------------------------------
 ambari-server/src/test/python/TestAmbariServer.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a902c537/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 cb870b8..408c088 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -2305,6 +2305,8 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
     :return: Validates that installation for each database type correctly stores the database
type, database name,
     and optionally the postgres schema name.
     """
+    from ambari_server import serverConfiguration
+
     _ambari_server_.PROMPT_DATABASE_OPTIONS = True
     gyni_mock.return_value = True
     rp_mock.return_value = "password"
@@ -2337,17 +2339,18 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
 
     tempdir = tempfile.gettempdir()
     os.environ[_ambari_server_.AMBARI_CONF_VAR] = tempdir
+    prop_file = os.path.join(tempdir, "ambari.properties")
 
     for i in range(1, 5):
         # Use the expected path of the ambari.properties file to delete it if it exists,
and then create a new one
         # during each use case.
-        prop_file = os.path.join(tempdir, "ambari.properties")
         if os.path.exists(prop_file):
           os.remove(prop_file)
         with open(prop_file, "w") as f:
           f.write("server.jdbc.database_name=oldDBName")
         f.close()
-        _ambari_server_.AMBARI_PROPERTIES_FILE = prop_file
+
+        serverConfiguration.AMBARI_PROPERTIES_FILE = prop_file
 
         args = MagicMock()
         _ambari_server_.load_default_db_properties(args)


Mime
View raw message