mirror of
https://github.com/grafana/grafana.git
synced 2025-01-04 13:17:16 -06:00
fe8d0d27d2
* pkg/components: Check errors
27 lines
607 B
Go
27 lines
607 B
Go
package imguploader
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
. "github.com/smartystreets/goconvey/convey"
|
|
)
|
|
|
|
func TestUploadToS3(t *testing.T) {
|
|
SkipConvey("[Integration test] for external_image_store.s3", t, func() {
|
|
cfg := setting.NewCfg()
|
|
err := cfg.Load(&setting.CommandLineArgs{
|
|
HomePath: "../../../",
|
|
})
|
|
So(err, ShouldBeNil)
|
|
|
|
s3Uploader, err := NewImageUploader()
|
|
So(err, ShouldBeNil)
|
|
|
|
path, err := s3Uploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
|
|
So(err, ShouldBeNil)
|
|
So(path, ShouldNotEqual, "")
|
|
})
|
|
}
|