s3uploader_test.go 543 B

123456789101112131415161718192021222324
  1. package imguploader
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/grafana/grafana/pkg/setting"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestUploadToS3(t *testing.T) {
  9. SkipConvey("[Integration test] for external_image_store.s3", t, func() {
  10. setting.NewConfigContext(&setting.CommandLineArgs{
  11. HomePath: "../../../",
  12. })
  13. s3Uploader, _ := NewImageUploader()
  14. path, err := s3Uploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
  15. So(err, ShouldBeNil)
  16. So(path, ShouldNotEqual, "")
  17. })
  18. }