pkg/components: Check errors (#19703)

* pkg/components: Check errors
This commit is contained in:
Arve Knudsen
2019-10-10 09:06:55 +02:00
committed by GitHub
parent 9b483e765b
commit fe8d0d27d2
5 changed files with 104 additions and 53 deletions
@@ -11,14 +11,15 @@ import (
func TestUploadToS3(t *testing.T) {
SkipConvey("[Integration test] for external_image_store.s3", t, func() {
cfg := setting.NewCfg()
cfg.Load(&setting.CommandLineArgs{
err := cfg.Load(&setting.CommandLineArgs{
HomePath: "../../../",
})
So(err, ShouldBeNil)
s3Uploader, _ := NewImageUploader()
s3Uploader, err := NewImageUploader()
So(err, ShouldBeNil)
path, err := s3Uploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
So(err, ShouldBeNil)
So(path, ShouldNotEqual, "")
})