| 123456789101112131415161718192021222324252627 |
- package store
- import (
- "git.wanbits.cc/sin/flytalk/config"
- "testing"
- )
- func TestQn_Upload(t *testing.T) {
- c := config.CreateQiniu("/home/yyk/github/flytalk/" + config.QiniuFile)
- t.Log(c)
- q := NewQn(c.Access, c.Secret, c.Bucket, c.Zone)
- f, err := q.Upload("/home/yyk/github/shotshock/assets/img/gongzhonghao.jpg")
- if err != nil {
- t.Error(err)
- }
- t.Log(f)
- }
- func TestQn_Delete(t *testing.T) {
- c := config.CreateQiniu("/home/yyk/github/flytalk/" + config.QiniuFile)
- t.Log(c)
- q := NewQn(c.Access, c.Secret, c.Bucket, c.Zone)
- err := q.Delete("http://twongpicd.shotshock.shop/gongzhonghao.jpg")
- if err != nil {
- t.Error(err)
- }
- }
|