Browse Source

fix ci_test

tags/v0.7.12^2
jojoliang 4 years ago
parent
commit
d18e8cfac2
  1. 8
      costesting/ci_test.go

8
costesting/ci_test.go

@ -56,7 +56,7 @@ const (
kBucket = "cosgosdktest-1259654469" kBucket = "cosgosdktest-1259654469"
kRegion = "ap-guangzhou" kRegion = "ap-guangzhou"
// 跨区域复制需要的目标存储桶,地域不能与kBucket存储桶相同
// 跨区域复制需要的目标存储桶,地域不能与kBucket存储桶相同, 目的存储桶需要开启多版本
kRepBucket = "cosgosdkreptest" kRepBucket = "cosgosdkreptest"
kRepRegion = "ap-chengdu" kRepRegion = "ap-chengdu"
@ -85,9 +85,9 @@ func (s *CosTestSuite) SetupSuite() {
s.Region = p[2] s.Region = p[2]
// Bucket name // Bucket name
pp := strings.Split(p[0], "-")
s.Bucket = pp[0]
s.Appid = pp[1]
pi := strings.LastIndex(p[0], "-")
s.Bucket = p[0][:pi]
s.Appid = p[0][pi+1:]
ib := &cos.BaseURL{BucketURL: bucketurl, BatchURL: batchurl} ib := &cos.BaseURL{BucketURL: bucketurl, BatchURL: batchurl}
s.Client = cos.NewClient(ib, &http.Client{ s.Client = cos.NewClient(ib, &http.Client{

Loading…
Cancel
Save