ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject [41/50] ambari git commit: AMBARI-20385 : Grafana is storing credentials in plain text in its configuration. (Unit test fix) (avijayan)
Date Fri, 10 Mar 2017 20:47:09 GMT
AMBARI-20385 : Grafana is storing credentials in plain text in its configuration. (Unit test
fix) (avijayan)


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

Branch: refs/heads/branch-dev-logsearch
Commit: 1bc0f0a02049fd31d128eb1fd8d41c8d4483ff36
Parents: d4839a9
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Fri Mar 10 07:18:10 2017 -0800
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Fri Mar 10 07:18:10 2017 -0800

----------------------------------------------------------------------
 .../python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1bc0f0a0/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py
b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py
index 67750b7..fcfbcf1 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py
@@ -36,9 +36,10 @@ class TestMetricsGrafana(RMFTestCase):
   sys.path.append(file_path)
   global metrics_grafana_util
 
+  @patch("metrics_grafana_util.create_grafana_admin_pwd")
   @patch("metrics_grafana_util.create_ams_datasource")
   @patch("metrics_grafana_util.create_ams_dashboards")
-  def test_start(self, create_ams_datasource_mock, create_ams_dashboards_mock):
+  def test_start(self, create_grafana_admin_pwd, create_ams_datasource_mock, create_ams_dashboards_mock):
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/metrics_grafana.py",
                        classname = "AmsGrafana",
                        command = "start",
@@ -75,6 +76,7 @@ class TestMetricsGrafana(RMFTestCase):
         not_if = "ambari-sudo.sh su ams -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]test
-f /var/run/ambari-metrics-grafana/grafana-server.pid && ps -p `cat /var/run/ambari-metrics-grafana/grafana-server.pid`'",
         user = 'ams',
     )
+    create_grafana_admin_pwd.assertCalled()
     create_ams_datasource_mock.assertCalled()
     create_ams_dashboards_mock.assertCalled()
     self.assertNoMoreResources()


Mime
View raw message