mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* remove unused function to interpolate URLs * share function to add headers between ds/plugin proxies * stop performing unnecessary plugin setting lookup * fix bug causing runtime errors when using complex templated URLs * lower case util functions not used outside of pluginproxy package * change test URL to a (valid) dummy URL to make intent clearer Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
22 lines
425 B
Go
22 lines
425 B
Go
package pluginproxy
|
|
|
|
import (
|
|
"testing"
|
|
|
|
. "github.com/smartystreets/goconvey/convey"
|
|
)
|
|
|
|
func TestDsAuthProvider(t *testing.T) {
|
|
Convey("When interpolating string", t, func() {
|
|
data := templateData{
|
|
SecureJsonData: map[string]string{
|
|
"Test": "0asd+asd",
|
|
},
|
|
}
|
|
|
|
interpolated, err := interpolateString("{{.SecureJsonData.Test}}", data)
|
|
So(err, ShouldBeNil)
|
|
So(interpolated, ShouldEqual, "0asd+asd")
|
|
})
|
|
}
|