From 5572588c54c2e6aba172b9d291f03128e8099822 Mon Sep 17 00:00:00 2001 From: "Jonathan A. Sternberg" Date: Wed, 9 Sep 2015 14:06:14 -0400 Subject: [PATCH 1/2] Update docstring for postgres session provider The postgres provider is named postgres and not postgresql. For somebody configuring the server from the config file example, it is very easy to write an invalid value into the file and accidentally use the "memory" provider instead because of a typo. --- conf/defaults.ini | 2 +- conf/sample.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/defaults.ini b/conf/defaults.ini index 234f8b7529d..941813fb4c6 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -67,7 +67,7 @@ path = grafana.db #################################### Session #################################### [session] -# Either "memory", "file", "redis", "mysql", "postgresql", default is "file" +# Either "memory", "file", "redis", "mysql", "postgres", default is "file" provider = file # Provider config options diff --git a/conf/sample.ini b/conf/sample.ini index ed3cbff6f76..e8550c66c1a 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -67,7 +67,7 @@ #################################### Session #################################### [session] -# Either "memory", "file", "redis", "mysql", "postgresql", default is "file" +# Either "memory", "file", "redis", "mysql", "postgres", default is "file" ;provider = file # Provider config options From 6e532231dc0e37cd40cffeb3bdc74e3b6c610af0 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Thu, 10 Sep 2015 13:27:45 +0000 Subject: [PATCH 2/2] Fix dataproxy_test.go tests This change fix dataproxy_test.go tests that was failing with: pkg/api/dataproxy_test.go:17: not enough arguments in call to NewReverseProxy pkg/api/dataproxy_test.go:39: not enough arguments in call to NewReverseProxy FAIL _/home/ubuntu/grafana/pkg/api [build failed] --- pkg/api/dataproxy_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/api/dataproxy_test.go b/pkg/api/dataproxy_test.go index 842730891ae..0e561c726e1 100644 --- a/pkg/api/dataproxy_test.go +++ b/pkg/api/dataproxy_test.go @@ -14,7 +14,8 @@ func TestDataSourceProxy(t *testing.T) { Convey("When getting graphite datasource proxy", t, func() { ds := m.DataSource{Url: "htttp://graphite:8080", Type: m.DS_GRAPHITE} - proxy := NewReverseProxy(&ds, "/render") + targetUrl, _ := url.Parse(ds.Url) + proxy := NewReverseProxy(&ds, "/render", targetUrl) requestUrl, _ := url.Parse("http://grafana.com/sub") req := http.Request{URL: requestUrl} @@ -36,7 +37,8 @@ func TestDataSourceProxy(t *testing.T) { Password: "password", } - proxy := NewReverseProxy(&ds, "") + targetUrl, _ := url.Parse(ds.Url) + proxy := NewReverseProxy(&ds, "", targetUrl) requestUrl, _ := url.Parse("http://grafana.com/sub") req := http.Request{URL: requestUrl}