File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 9
9
"time"
10
10
11
11
. "github.com/smartystreets/goconvey/convey"
12
+ "github.com/stretchr/testify/require"
12
13
13
14
"github.com/grafana/grafana/pkg/components/simplejson"
14
15
"github.com/grafana/grafana/pkg/setting"
@@ -201,11 +202,14 @@ func TestDataSourceCache(t *testing.T) {
201
202
// Can't use So() here, see: https://github.com/smartystreets/goconvey/issues/561
202
203
if r .Header .Get ("Authorization" ) == "Bearer xf5yhfkpsnmgo" {
203
204
w .WriteHeader (200 )
204
- w .Write ([]byte ("Ok" ))
205
+ _ , err := w .Write ([]byte ("Ok" ))
206
+ require .Nil (t , err )
205
207
return
206
208
}
209
+
207
210
w .WriteHeader (403 )
208
- w .Write ([]byte ("Invalid bearer token provided" ))
211
+ _ , err := w .Write ([]byte ("Invalid bearer token provided" ))
212
+ require .Nil (t , err )
209
213
}))
210
214
defer backend .Close ()
211
215
You can’t perform that action at this time.
0 commit comments