azureblobuploader_test.go 594 B

1234567891011121314151617181920212223242526
  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 TestUploadToAzureBlob(t *testing.T) {
  9. SkipConvey("[Integration test] for external_image_store.azure_blob", t, func() {
  10. cfg := setting.NewCfg()
  11. err := cfg.Load(&setting.CommandLineArgs{
  12. HomePath: "../../../",
  13. })
  14. So(err, ShouldBeNil)
  15. uploader, _ := NewImageUploader()
  16. path, err := uploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
  17. So(err, ShouldBeNil)
  18. So(path, ShouldNotEqual, "")
  19. })
  20. }