Skip to content

Commit 96af2de

Browse files
committed
Merge pull request grafana#2717 from sileht/sileht/dataproxy_test-bug
Fix dataproxy_test.go tests
2 parents ec3a684 + 6e53223 commit 96af2de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/api/dataproxy_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ func TestDataSourceProxy(t *testing.T) {
1414

1515
Convey("When getting graphite datasource proxy", t, func() {
1616
ds := m.DataSource{Url: "htttp://graphite:8080", Type: m.DS_GRAPHITE}
17-
proxy := NewReverseProxy(&ds, "/render")
17+
targetUrl, _ := url.Parse(ds.Url)
18+
proxy := NewReverseProxy(&ds, "/render", targetUrl)
1819

1920
requestUrl, _ := url.Parse("http://grafana.com/sub")
2021
req := http.Request{URL: requestUrl}
@@ -36,7 +37,8 @@ func TestDataSourceProxy(t *testing.T) {
3637
Password: "password",
3738
}
3839

39-
proxy := NewReverseProxy(&ds, "")
40+
targetUrl, _ := url.Parse(ds.Url)
41+
proxy := NewReverseProxy(&ds, "", targetUrl)
4042

4143
requestUrl, _ := url.Parse("http://grafana.com/sub")
4244
req := http.Request{URL: requestUrl}

0 commit comments

Comments
 (0)