浏览代码

Merge branch 'master' of github.com:grafana/grafana

Torkel Ödegaard 10 年之前
父节点
当前提交
fb9e91e486
共有 3 个文件被更改,包括 6 次插入4 次删除
  1. 1 1
      conf/defaults.ini
  2. 1 1
      conf/sample.ini
  3. 4 2
      pkg/api/dataproxy_test.go

+ 1 - 1
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

+ 1 - 1
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

+ 4 - 2
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}