@@ -15,6 +15,10 @@ var logo2 = Math.random() + 'logo2.png';
1515var logo3 = Math . random ( ) + 'logo3.png' ;
1616var logo4 = Math . random ( ) + 'logo4.png' ;
1717var logo5 = Math . random ( ) + 'logo5.png' ;
18+ var logo6 = Math . random ( ) + 'logo6.png' ;
19+ var logo7 = Math . random ( ) + 'logo7.png' ;
20+
21+
1822
1923describe ( 'test start step2:' , function ( ) {
2024
@@ -32,13 +36,25 @@ describe('test start step2:', function() {
3236 TEST_BUCKET
3337 ) ;
3438 var uptoken = putPolicy . token ( ) ;
39+ qiniu . io . putFile ( uptoken , logo , imageFile , null , function ( err , ret ) {
40+ should . not . exist ( err ) ;
41+ } ) ;
42+
43+ qiniu . io . putFile ( uptoken , logo1 , imageFile , null , function ( err , ret ) {
44+ should . not . exist ( err ) ;
45+ done ( ) ;
46+ } ) ;
47+
3548 qiniu . io . putFile ( uptoken , logo2 , imageFile , null , function ( err , ret ) {
3649 should . not . exist ( err ) ;
50+ done ( ) ;
3751 } ) ;
38- qiniu . io . putFile ( uptoken , logo , imageFile , null , function ( err , ret ) {
52+
53+ qiniu . io . putFile ( uptoken , logo3 , imageFile , null , function ( err , ret ) {
3954 should . not . exist ( err ) ;
4055 done ( ) ;
4156 } ) ;
57+
4258 } ) ;
4359
4460 describe ( 'rs.Client#stat()' , function ( ) {
@@ -52,8 +68,8 @@ describe('test start step2:', function() {
5268 } ) ;
5369
5470 describe ( 'rs.Client#copy()' , function ( ) {
55- it ( 'copy logo.png to logo1 .png' , function ( done ) {
56- client . copy ( TEST_BUCKET , logo , TEST_BUCKET , logo1 , function ( err , ret ) {
71+ it ( 'copy logo.png to logo5 .png' , function ( done ) {
72+ client . copy ( TEST_BUCKET , logo , TEST_BUCKET , logo5 , function ( err , ret ) {
5773 should . not . exist ( err ) ;
5874 done ( ) ;
5975 } ) ;
@@ -71,26 +87,26 @@ describe('test start step2:', function() {
7187
7288
7389 describe ( 'rs.Client#remove()' , function ( ) {
74- it ( 'remove logo .png' , function ( done ) {
75- client . remove ( TEST_BUCKET , logo , function ( err , ret ) {
90+ it ( 'remove logo5 .png' , function ( done ) {
91+ client . remove ( TEST_BUCKET , logo5 , function ( err , ret ) {
7692 should . not . exist ( err ) ;
7793 done ( ) ;
7894 } ) ;
7995 } ) ;
8096 } ) ;
8197
8298 describe ( 'rs.Client#move()' , function ( ) {
83- it ( 'move logo.png to logo3 .png' , function ( done ) {
84- client . move ( TEST_BUCKET , logo , TEST_BUCKET , logo3 , function ( err , ret ) {
99+ it ( 'move logo.png to logo5 .png' , function ( done ) {
100+ client . move ( TEST_BUCKET , logo , TEST_BUCKET , logo5 , function ( err , ret ) {
85101 should . not . exist ( err ) ;
86102 done ( ) ;
87103 } ) ;
88104 } ) ;
89105 } ) ;
90106
91107 describe ( 'rs.Client#forceMove()' , function ( ) {
92- it ( 'move logo3 .png to logo.png' , function ( done ) {
93- client . forceMove ( TEST_BUCKET , logo3 , TEST_BUCKET , logo , 1 , function ( err , ret ) {
108+ it ( 'move logo5 .png to logo.png' , function ( done ) {
109+ client . forceMove ( TEST_BUCKET , logo5 , TEST_BUCKET , logo , 1 , function ( err , ret ) {
94110 should . not . exist ( err ) ;
95111 done ( ) ;
96112 } ) ;
@@ -151,10 +167,10 @@ describe('test start step2:', function() {
151167
152168 describe ( 'rs.Client#batchCopy' , function ( ) {
153169 var entries = [ ] ;
154- entries . push ( new EntryPathPair ( new EntryPath ( TEST_BUCKET , logo ) , new EntryPath ( TEST_BUCKET , logo1 ) ) ) ;
155- entries . push ( new EntryPathPair ( new EntryPath ( TEST_BUCKET , logo2 ) , new EntryPath ( TEST_BUCKET , logo3 ) ) ) ;
170+ entries . push ( new EntryPathPair ( new EntryPath ( TEST_BUCKET , logo ) , new EntryPath ( TEST_BUCKET , logo6 ) ) ) ;
171+ entries . push ( new EntryPathPair ( new EntryPath ( TEST_BUCKET , logo2 ) , new EntryPath ( TEST_BUCKET , logo7 ) ) ) ;
156172
157- it ( 'copy from logo, logo2 to logo1, logo3 ' , function ( done ) {
173+ it ( 'copy from logo, logo2 to logo6, logo7 ' , function ( done ) {
158174 client . batchCopy ( entries , function ( err , ret ) {
159175 should . not . exist ( err ) ;
160176 ret . should . eql ( [ { code : 200 } , { code : 200 } ] ) ;
0 commit comments