From eb4e1ac4c93dacfe9cfe413271abe0c2e926e362 Mon Sep 17 00:00:00 2001 From: jojoliang Date: Thu, 17 Sep 2020 10:31:44 +0800 Subject: [PATCH] fix bucket encryption & test --- bucket_encryption.go | 2 +- costesting/ci_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bucket_encryption.go b/bucket_encryption.go index eae8334..9de5c5a 100644 --- a/bucket_encryption.go +++ b/bucket_encryption.go @@ -12,7 +12,7 @@ type BucketEncryptionConfiguration struct { type BucketPutEncryptionOptions struct { XMLName xml.Name `xml:"ServerSideEncryptionConfiguration"` - Rule *BucketEncryptionConfiguration `xml:"Rule>ApplySideEncryptionConfiguration"` + Rule *BucketEncryptionConfiguration `xml:"Rule>ApplyServerSideEncryptionByDefault"` } type BucketGetEncryptionResult BucketPutEncryptionOptions diff --git a/costesting/ci_test.go b/costesting/ci_test.go index 491bce8..0218549 100644 --- a/costesting/ci_test.go +++ b/costesting/ci_test.go @@ -61,9 +61,9 @@ const ( kRepRegion = "ap-chengdu" // Batch测试需要的源存储桶和目标存储桶,目前只在成都、重庆地域公测 - kBatchBucket = "testcd-1259654469" - kTargetBatchBucket = "cosgosdkreptest-1259654469" //复用了存储桶 - kBatchRegion = "ap-chengdu" + kBatchBucket = "cosgosdktest-1259654469" + kTargetBatchBucket = "cosgosdktest-1259654469" //复用了存储桶 + kBatchRegion = "ap-guangzhou" ) func (s *CosTestSuite) SetupSuite() { @@ -812,7 +812,7 @@ func (s *CosTestSuite) TestBatch() { assert.Equal(s.T(), res3.Priority, 3, "priority not right") // 等待状态变成Suspended - for i := 0; i < 10; i = i + 1 { + for i := 0; i < 50; i = i + 1 { res, _, err := client.Batch.DescribeJob(context.Background(), jobid, headers) assert.Nil(s.T(), err, "describe job Failed") assert.Equal(s.T(), res2.Job.ConfirmationRequired, "true", "ConfirmationRequired not right")