File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -6919,3 +6919,37 @@ group('returnBody', function () {
6919
6919
) ;
6920
6920
} ) ;
6921
6921
} ) ;
6922
+
6923
+
6924
+ group ( 'EnableLog' , function ( ) {
6925
+ test ( 'EnableLog uploadFile' , function ( done ) {
6926
+ const cos = new COS ( {
6927
+ // 必选参数
6928
+ SecretId : config . SecretId ,
6929
+ SecretKey : config . SecretKey ,
6930
+ EnableLog : true ,
6931
+ } ) ;
6932
+ cos . uploadFile (
6933
+ {
6934
+ Bucket : config . Bucket ,
6935
+ Region : config . Region ,
6936
+ Key : '2mb.zip' ,
6937
+ Body : util . createFile ( { size : 1024 * 1024 * 2 } ) ,
6938
+ ChunkSize : 1024 * 1024 ,
6939
+ } ,
6940
+ function ( err , data ) {
6941
+ cos . getObject (
6942
+ {
6943
+ Bucket : config . Bucket ,
6944
+ Region : config . Region ,
6945
+ Key : '1mb.zip' ,
6946
+ } ,
6947
+ function ( err , data ) {
6948
+ assert . ok ( data ) ;
6949
+ done ( ) ;
6950
+ }
6951
+ ) ;
6952
+ }
6953
+ ) ;
6954
+ } ) ;
6955
+ } ) ;
You can’t perform that action at this time.
0 commit comments