grafana/pkg/components/imguploader/azureblobuploader_test.go

29 lines
666 B
Go
Raw Normal View History

package imguploader
import (
"context"
"testing"
"github.com/grafana/grafana/pkg/setting"
2021-07-02 06:22:47 -05:00
"github.com/stretchr/testify/require"
)
func TestUploadToAzureBlob(t *testing.T) {
2021-07-02 06:22:47 -05:00
t.Run("[Integration test] for external_image_store.azure_blob", func(t *testing.T) {
t.Skip("Skipping testing for external_image_store.azure_blob")
cfg := setting.NewCfg()
err := cfg.Load(setting.CommandLineArgs{
HomePath: "../../../",
})
2021-07-02 06:22:47 -05:00
require.NoError(t, err)
uploader, _ := NewImageUploader(cfg)
path, err := uploader.Upload(context.Background(), "../../../public/img/logo_transparent_400x.png")
2021-07-02 06:22:47 -05:00
require.NoError(t, err)
require.NotEqual(t, "", path)
})
}