release v1.20

This commit is contained in:
deepzz0
2017-06-14 21:25:18 +08:00
parent 1634418a13
commit 54f5289d6b
134 changed files with 26141 additions and 18531 deletions
+48
View File
@@ -0,0 +1,48 @@
package cdn
import (
"fmt"
"reflect"
"testing"
"qiniupkg.com/api.v7/kodo"
)
func init() {
kodo.SetMac(ak, sk)
}
func TestGetCdnLogList(t *testing.T) {
type args struct {
date string
domains string
}
tests := []struct {
name string
args args
wantDomainLogs []LogDomainInfo
wantErr bool
}{
{
name: "getCdnLogListTest",
args: args{
date: testDate,
domains: domain,
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
gotDomainLogs, err := GetCdnLogList(tt.args.date, tt.args.domains)
if (err != nil) != tt.wantErr {
t.Errorf("GetCdnLogList() error = %v, wantErr %v", err, tt.wantErr)
return
}
fmt.Println(domain, gotDomainLogs)
if !reflect.DeepEqual(gotDomainLogs, tt.wantDomainLogs) {
t.Errorf("GetCdnLogList() = %v, want %v", gotDomainLogs, tt.wantDomainLogs)
}
})
}
}