Remove unused Macaron code and interfaces (#37194)

This commit is contained in:
Serge Zaitsev
2021-07-26 11:47:13 +02:00
committed by GitHub
parent e3622ac1da
commit e42a597e87
4 changed files with 4 additions and 77 deletions
+1 -20
View File
@@ -569,12 +569,7 @@ func TestDataSourceProxy_requestHandling(t *testing.T) {
ds := &models.DataSource{Url: backend.URL, Type: models.DS_GRAPHITE}
responseRecorder := &closeNotifierResponseRecorder{
ResponseRecorder: httptest.NewRecorder(),
}
t.Cleanup(responseRecorder.Close)
responseWriter := macaron.NewResponseWriter("GET", responseRecorder)
responseWriter := macaron.NewResponseWriter("GET", httptest.NewRecorder())
// XXX: Really unsure why, but setting headers within the HTTP handler function doesn't stick,
// so doing it here instead
@@ -751,20 +746,6 @@ func TestNewDataSourceProxy_MSSQL(t *testing.T) {
}
}
type closeNotifierResponseRecorder struct {
*httptest.ResponseRecorder
closeChan chan bool
}
func (r *closeNotifierResponseRecorder) CloseNotify() <-chan bool {
r.closeChan = make(chan bool)
return r.closeChan
}
func (r *closeNotifierResponseRecorder) Close() {
close(r.closeChan)
}
// getDatasourceProxiedRequest is a helper for easier setup of tests based on global config and ReqContext.
func getDatasourceProxiedRequest(t *testing.T, ctx *models.ReqContext, cfg *setting.Cfg) *http.Request {
plugin := &plugins.DataSourcePlugin{}