You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
514 B
Go

package upload
import (
"joybuywork/internal/config"
"testing"
)
func init() {
config.Config.Upload = config.Oss{
AccessKey: "LTAI5tNvMLF181bTb3qCZxk4",
Secret: "9HXWh6yTXhbBQ7WaMkS1c3o0UNtl7A",
Endpoint: "https://oss-cn-shenzhen.aliyuncs.com",
BucketName: "client-project-resource",
Prefix: "resource/",
}
}
func TestGetPolicy(t *testing.T) {
t.Run("有suffix", func(t *testing.T) {
t.Log(GetPolicy("jpg"))
})
t.Run("没suffix", func(t *testing.T) {
t.Log(GetPolicy(""))
})
}