Skip to content

Commit

Permalink
update ut.
Browse files Browse the repository at this point in the history
  • Loading branch information
wjielai committed Oct 29, 2019
1 parent ea69a42 commit 9b9ad6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
7 changes: 4 additions & 3 deletions QCloudCSharpSDK/COSXMLTests/BucketTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,13 +1441,14 @@ public void testBucket()
PutBucketACL(instance.cosXml, instance.bucketForBucketTest);
GetBucketACL(instance.cosXml, instance.bucketForBucketTest);

DeleteBucketCORS(instance.cosXml, instance.bucketForBucketTest);
Thread.Sleep(300);
PutBucketCORS(instance.cosXml, instance.bucketForBucketTest);
Thread.Sleep(300);
GetBucketCORS(instance.cosXml, instance.bucketForBucketTest);
DeleteBucketCORS(instance.cosXml, instance.bucketForBucketTest);

PutBucketLifeCycle(instance.cosXml, instance.bucketForBucketTest);
Thread.Sleep(100);
Thread.Sleep(1000);
GetBucketLifeCycle(instance.cosXml, instance.bucketForBucketTest);
DeleteBucketLifeCycle(instance.cosXml, instance.bucketForBucketTest);

Expand All @@ -1464,7 +1465,7 @@ public void testBucket()

DeleteBucketPolicy(instance.cosXml, instance.bucketForBucketTest);

DeleteBucket(instance.cosXml, instance.bucketForBucketTest);
// DeleteBucket(instance.cosXml, instance.bucketForBucketTest);

Assert.True(true);

Expand Down
6 changes: 3 additions & 3 deletions QCloudCSharpSDK/COSXMLTests/ObjectTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,9 +1128,9 @@ public void testGetObjectByte() {
QCloudServer instance = QCloudServer.Instance();

string key = "test.pdf";
// string srcPath = QCloudServer.CreateFile(TimeUtils.GetCurrentTime(TimeUnit.SECONDS) + ".txt", 1024 * 1024 * 2);
string srcPath = QCloudServer.CreateFile(TimeUtils.GetCurrentTime(TimeUnit.SECONDS) + ".txt", 1024 * 1024 * 2);

// PutObject(instance.cosXml, instance.bucketForObjectTest, key, @srcPath);
PutObject(instance.cosXml, instance.bucketForObjectTest, key, @srcPath);

try
{
Expand Down Expand Up @@ -1186,7 +1186,7 @@ public void testObject()

PutObjectWithCustomerKey(instance.cosXml, instance.bucketForObjectTest, "customerKey_" + key, @srcPath);

PutObjectWithKMS(instance.cosXml, instance.bucketForObjectTest, "KMS" + key, @srcPath);
// PutObjectWithKMS(instance.cosXml, instance.bucketForObjectTest, "KMS" + key, @srcPath);

HeadObject(instance.cosXml, instance.bucketForObjectTest, key);

Expand Down
8 changes: 4 additions & 4 deletions QCloudCSharpSDK/COSXMLTests/QCloudServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ private QCloudServer()
string secretId = Environment.GetEnvironmentVariable("COS_KEY");
string secretKey = Environment.GetEnvironmentVariable("COS_SECRET");
region = Environment.GetEnvironmentVariable("COS_REGION");
bucketForBucketTest = "bucket-4-csharp-test";
bucketForObjectTest = Environment.GetEnvironmentVariable("COS_BUCKET");
if (bucketForObjectTest == null) {
bucketForObjectTest = "bucket-4-csharp-obj-test";
bucketForBucketTest = Environment.GetEnvironmentVariable("COS_BUCKET");
if (bucketForBucketTest == null) {
bucketForBucketTest = "bucket-4-csharp-test";
}
bucketForObjectTest = bucketForBucketTest;

if (appid == null)
{
Expand Down

0 comments on commit 9b9ad6e

Please sign in to comment.