2017-07-29 21:31:28 -05:00
|
|
|
package imguploader
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
|
|
. "github.com/smartystreets/goconvey/convey"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestUploadToAzureBlob(t *testing.T) {
|
|
|
|
SkipConvey("[Integration test] for external_image_store.azure_blob", t, func() {
|
2018-04-30 09:21:04 -05:00
|
|
|
cfg := setting.NewCfg()
|
|
|
|
err := cfg.Load(&setting.CommandLineArgs{
|
2017-07-29 21:31:28 -05:00
|
|
|
HomePath: "../../../",
|
|
|
|
})
|
2018-04-23 13:03:57 -05:00
|
|
|
So(err, ShouldBeNil)
|
2017-07-29 21:31:28 -05:00
|
|
|
|
|
|
|
uploader, _ := NewImageUploader()
|
|
|
|
|
|
|
|
path, err := uploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
|
|
|
|
|
|
|
|
So(err, ShouldBeNil)
|
|
|
|
So(path, ShouldNotEqual, "")
|
|
|
|
})
|
|
|
|
}
|