You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2017/03/10 15:10:34 UTC
ambari git commit: AMBARI-20385 : Grafana is storing credentials in
plain text in its configuration. (Unit test fix) (avijayan)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 c31a62025 -> 6d8444f64
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/6d8444f6
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6d8444f6
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6d8444f6
Branch: refs/heads/branch-2.5
Commit: 6d8444f6477c2cf4b13f66883e6525437c29e004
Parents: c31a620
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Fri Mar 10 07:09:07 2017 -0800
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Fri Mar 10 07:09:07 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/6d8444f6/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()