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("")) }) }