mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
parent
8ba5509614
commit
9843a886f7
@ -9,6 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
@ -201,11 +202,14 @@ func TestDataSourceCache(t *testing.T) {
|
||||
// Can't use So() here, see: https://github.com/smartystreets/goconvey/issues/561
|
||||
if r.Header.Get("Authorization") == "Bearer xf5yhfkpsnmgo" {
|
||||
w.WriteHeader(200)
|
||||
w.Write([]byte("Ok"))
|
||||
_, err := w.Write([]byte("Ok"))
|
||||
require.Nil(t, err)
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(403)
|
||||
w.Write([]byte("Invalid bearer token provided"))
|
||||
_, err := w.Write([]byte("Invalid bearer token provided"))
|
||||
require.Nil(t, err)
|
||||
}))
|
||||
defer backend.Close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user