Browse Source

Fix the ci test

tags/v0.7.8
toranger 6 years ago
parent
commit
06314d9eb2
  1. 12
      costesting/ci_test.go

12
costesting/ci_test.go

@ -251,15 +251,15 @@ func (s *CosTestSuite) TestBucketInventory() {
},
},
}
_, err := s.Client.Bucket.PutBucketInventory(context.Background(), id, opt)
_, err := s.Client.Bucket.PutBucketInventoryTest(context.Background(), id, opt)
assert.Nil(s.T(), err, "PutBucketInventory Failed")
v, _, err := s.Client.Bucket.GetBucketInventory(context.Background(), id)
v, _, err := s.Client.Bucket.GetBucketInventoryTest(context.Background(), id)
assert.Nil(s.T(), err, "GetBucketInventory Failed")
assert.Equal(s.T(), "test1", v.ID, "Get Wrong inventory id")
assert.Equal(s.T(), "True", v.IsEnabled, "Get Wrong inventory isenabled")
assert.Equal(s.T(), "true", v.IsEnabled, "Get Wrong inventory isenabled")
assert.Equal(s.T(), "qcs::cos:ap-guangzhou::alangz-1251668577", v.Destination.BucketDestination.Bucket, "Get Wrong inventory isenabled")
_, err = s.Client.Bucket.DeleteBucketInventory(context.Background(), id)
_, err = s.Client.Bucket.DeleteBucketInventoryTest(context.Background(), id)
assert.Nil(s.T(), err, "DeleteBucketInventory Failed")
}
@ -271,9 +271,9 @@ func (s *CosTestSuite) TestBucketLogging() {
TargetBucket: "alangz-1251668577",
},
}
_, err := s.Client.Bucket.PutBucketLogging(context.Background(), opt)
_, err := s.Client.Bucket.PutBucketLoggingTest(context.Background(), opt)
assert.Nil(s.T(), err, "PutBucketLogging Failed")
v, _, err := s.Client.Bucket.GetBucketLogging(context.Background())
v, _, err := s.Client.Bucket.GetBucketLoggingTest(context.Background())
assert.Nil(s.T(), err, "GetBucketLogging Failed")
assert.Equal(s.T(), "alangz-1251668577", v.LoggingEnabled.TargetBucket, "Get Wrong Version status")

Loading…
Cancel
Save