You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2015/09/18 17:16:09 UTC
ambari git commit: AMBARI-13140. Ambari QE Deploy Test: ambari-server
failed to start with SQLA due to invalid credentials.(vbrodetskyi)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 8d59cb564 -> 8aaa779d0
AMBARI-13140. Ambari QE Deploy Test: ambari-server failed to start with SQLA due to invalid credentials.(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8aaa779d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8aaa779d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8aaa779d
Branch: refs/heads/branch-2.1
Commit: 8aaa779d075bb81a1372c8b25aec0d75695dd0f2
Parents: 8d59cb5
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Fri Sep 18 18:15:43 2015 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Fri Sep 18 18:15:43 2015 +0300
----------------------------------------------------------------------
.../main/python/ambari_server/dbConfiguration_linux.py | 6 +++---
ambari-server/src/test/python/TestAmbariServer.py | 13 +++++++++++++
2 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8aaa779d/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
index 53dba23..fc568bf7 100644
--- a/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
+++ b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
@@ -114,7 +114,7 @@ class LinuxDBMSConfig(DBMSConfig):
"followed by alphanumeric or _ or - characters",
False
)
- self.database_password = LinuxDBMSConfig._configure_database_password(True)
+ self.database_password = LinuxDBMSConfig._configure_database_password(True, self.database_password)
self._display_db_properties()
return True
@@ -186,8 +186,8 @@ class LinuxDBMSConfig(DBMSConfig):
return None
@staticmethod
- def _configure_database_password(showDefault=True):
- passwordDefault = DEFAULT_PASSWORD
+ def _configure_database_password(showDefault=True, defaultPassword=DEFAULT_PASSWORD):
+ passwordDefault = defaultPassword
if showDefault:
passwordPrompt = 'Enter Database Password (' + passwordDefault + '): '
else:
http://git-wip-us.apache.org/repos/asf/ambari/blob/8aaa779d/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 addfce3..06b6331 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -5272,6 +5272,19 @@ MIIFHjCCAwYCCQDpHKOBI+Lt0zANBgkqhkiG9w0BAQUFADBRMQswCQYDVQQGEwJV
pass
+ @not_for_platform(PLATFORM_WINDOWS)
+ def test_configure_database_password_silent(self):
+
+ out = StringIO.StringIO()
+ sys.stdout = out
+
+ set_silent(True)
+ result = LinuxDBMSConfig._configure_database_password(True, "CustomDefaultPasswd")
+ self.assertEquals("CustomDefaultPasswd", result)
+
+ sys.stdout = sys.__stdout__
+ pass
+
@patch("os.path.exists")
@patch("ambari_server.setupSecurity.get_is_secure")
@patch("ambari_server.setupSecurity.get_is_persisted")