Skip to content

Commit

Permalink
Merge pull request #89 from agin719/common-dev
Browse files Browse the repository at this point in the history
fix ci_test
  • Loading branch information
agin719 authored Nov 25, 2020
2 parents 95b1272 + d18e8cf commit 6bc7b52
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions costesting/ci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const (
kBucket = "cosgosdktest-1259654469"
kRegion = "ap-guangzhou"

// 跨区域复制需要的目标存储桶,地域不能与kBucket存储桶相同
// 跨区域复制需要的目标存储桶,地域不能与kBucket存储桶相同, 目的存储桶需要开启多版本
kRepBucket = "cosgosdkreptest"
kRepRegion = "ap-chengdu"

Expand Down Expand Up @@ -85,9 +85,9 @@ func (s *CosTestSuite) SetupSuite() {
s.Region = p[2]

// 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}
s.Client = cos.NewClient(ib, &http.Client{
Expand Down Expand Up @@ -185,12 +185,12 @@ func (s *CosTestSuite) TestGetBucket() {
}

func (s *CosTestSuite) TestGetObjectVersions() {
opt := &cos.BucketGetObjectVersionsOptions {
opt := &cos.BucketGetObjectVersionsOptions{
Prefix: "中文",
MaxKeys: 3,
}
_, _, err := s.Client.Bucket.GetObjectVersions(context.Background(), opt)
assert.Nil(s.T(), err, "GetObjectVersions Failed")
_, _, err := s.Client.Bucket.GetObjectVersions(context.Background(), opt)
assert.Nil(s.T(), err, "GetObjectVersions Failed")
}

func (s *CosTestSuite) TestGetBucketLocation() {
Expand Down

0 comments on commit 6bc7b52

Please sign in to comment.