Added basic auth to data source edit/create, add support for basic auth in data source proxy code, Closes #1510

This commit is contained in:
Torkel Ödegaard
2015-03-02 09:58:35 +01:00
parent ea1164322b
commit 9710771f16
13 changed files with 156 additions and 84 deletions

16
pkg/util/encoding_test.go Normal file
View File

@@ -0,0 +1,16 @@
package util
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestEncoding(t *testing.T) {
Convey("When generating base64 header", t, func() {
result := GetBasicAuthHeader("grafana", "1234")
So(result, ShouldEqual, "Z3JhZmFuYToxMjM0")
})
}