Skip to content

Commit 485a0f8

Browse files
committed
fix
1 parent e508c34 commit 485a0f8

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

Qiniu.Test/IO/IOClientTest.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ public void PutFileTest()
7373
extra.Crc32 = 123;
7474
extra.CheckCrc = CheckCrcType.CHECK;
7575
extra.Params = new System.Collections.Generic.Dictionary<string, string> ();
76-
extra.Scope = Bucket;
77-
PutPolicy put = new PutPolicy (extra.Scope);
76+
PutPolicy put = new PutPolicy (Bucket);
7877
TmpFIle file = new TmpFIle (1024 * 10);
7978
target.PutFinished += new EventHandler<PutRet> ((o,e) => {
8079
file.Del ();
@@ -105,8 +104,7 @@ public void PutFileWithoutKeyTest()
105104
extra.Crc32 = 123;
106105
extra.CheckCrc = CheckCrcType.CHECK;
107106
extra.Params = new System.Collections.Generic.Dictionary<string, string> ();
108-
extra.Scope = Bucket;
109-
PutPolicy put = new PutPolicy (extra.Scope);
107+
PutPolicy put = new PutPolicy (Bucket);
110108
TmpFIle file = new TmpFIle (1024 * 10);
111109
target.PutFinished += new EventHandler<PutRet> ((o,e) => {
112110
file.Del ();
@@ -133,8 +131,7 @@ public void PutTest()
133131
extra.Crc32 = 123;
134132
extra.CheckCrc = CheckCrcType.CHECK;
135133
extra.Params = new System.Collections.Generic.Dictionary<string, string>();
136-
extra.Scope = Bucket;
137-
PutPolicy put = new PutPolicy(extra.Scope);
134+
PutPolicy put = new PutPolicy(Bucket);
138135
target.PutFinished += new EventHandler<PutRet> ((o,e) => {
139136
if (e.OK) {
140137
RSHelper.RSDel (Bucket, key);

Qiniu.Test/IO/Resumable/ResumablePutTest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ public void ResumablePutFileTest()
3131
extra.CallbackParams = nc;
3232
extra.Notify += new EventHandler<PutNotifyEvent>(extra_Notify);
3333
extra.NotifyErr += new EventHandler<PutNotifyErrorEvent>(extra_NotifyErr);
34-
extra.Bucket = Bucket;
3534
ResumablePut target = new ResumablePut(putSetting, extra); // TODO: 初始化为适当的值
36-
Console.WriteLine ("extra.Bucket:"+extra.Bucket);
37-
string upToken = new PutPolicy(extra.Bucket).Token(new Qiniu.Auth.digest.Mac());
35+
Console.WriteLine ("extra.Bucket:"+Bucket);
36+
string upToken = new PutPolicy(Bucket).Token(new Qiniu.Auth.digest.Mac());
3837
target.Progress += new Action<float>(target_Progress);
3938
TmpFIle file=new TmpFIle(1024*1024*4);
4039
target.PutFinished += new EventHandler<CallRet> ((o,e) => {

Qiniu.Test/TestHelper/RSHelper.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ public static List<string> RSPut(string bucket,int num)
2727
//PrintLn(key);
2828
PutExtra extra = new PutExtra(); // TODO: 初始化为适当的值
2929
extra.MimeType = "text/plain";
30-
extra.Scope = bucket;
31-
PutPolicy put = new PutPolicy(extra.Scope);
32-
30+
PutPolicy put = new PutPolicy(bucket);
3331
List<string> newKeys=new List<string>();
3432
for (int i=0; i<num; i++) {
3533
key = "csharp" + Guid.NewGuid ().ToString ();

0 commit comments

Comments
 (0)