s3uploader_test.go 553 B

12345678910111213141516171819202122232425
  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. cfg := setting.NewCfg()
  11. cfg.Load(&setting.CommandLineArgs{
  12. HomePath: "../../../",
  13. })
  14. s3Uploader, _ := NewImageUploader()
  15. path, err := s3Uploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
  16. So(err, ShouldBeNil)
  17. So(path, ShouldNotEqual, "")
  18. })
  19. }