mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
test(imageupload): add more specific tests
torkels commit will fix this unit test :)
This commit is contained in:
23
pkg/components/imguploader/s3uploader_test.go
Normal file
23
pkg/components/imguploader/s3uploader_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package imguploader
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func TestUploadToS3(t *testing.T) {
|
||||
SkipConvey("[Integration test] for external_image_store.webdav", t, func() {
|
||||
setting.NewConfigContext(&setting.CommandLineArgs{
|
||||
HomePath: "../../../",
|
||||
})
|
||||
|
||||
s3Uploader, _ := NewImageUploader()
|
||||
|
||||
path, err := s3Uploader.Upload("../../../public/img/logo_transparent_400x.png")
|
||||
|
||||
So(err, ShouldBeNil)
|
||||
So(path, ShouldNotEqual, "")
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user