mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
update vendor
This commit is contained in:
48
vendor/github.com/qiniu/api.v7/cdn/logs_test.go
generated
vendored
Normal file
48
vendor/github.com/qiniu/api.v7/cdn/logs_test.go
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
package cdn
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/qiniu/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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user