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