@@ -53,7 +53,10 @@ describe('test/OSSObject.test.ts', () => {
5353 }
5454
5555 it ( 'should list with query' , async ( ) => {
56- const result = await ossObject . list ( ) ;
56+ const result = await ossObject . list ( {
57+ prefix : listPrefix ,
58+ 'max-keys' : 5 ,
59+ } ) ;
5760 assert ( result . objects . length > 0 ) ;
5861 // console.log(result.objects);
5962 result . objects . map ( checkObjectProperties ) ;
@@ -1728,8 +1731,8 @@ describe('test/OSSObject.test.ts', () => {
17281731 describe ( 'copy()' , ( ) => {
17291732 let name : string ;
17301733 let resHeaders : IncomingHttpHeaders ;
1731- let otherBucket : string ;
1732- let otherBucketObject : string ;
1734+ // let otherBucket: string;
1735+ // let otherBucketObject: string;
17331736 before ( async ( ) => {
17341737 name = `${ prefix } oss-client/oss/copy-meta.js` ;
17351738 const object = await ossObject . put ( name , __filename , {
@@ -1783,25 +1786,25 @@ describe('test/OSSObject.test.ts', () => {
17831786 assert . strictEqual ( res . headers [ 'content-disposition' ] , disposition ) ;
17841787 } ) ;
17851788
1786- it . skip ( 'should copy object from other bucket, sourceBucket in copySource' , async ( ) => {
1787- const copySource = `/${ otherBucket } /${ otherBucketObject } ` ;
1788- const copyTarget = `${ prefix } oss-client/oss/copy-target.js` ;
1789- const result = await ossObject . copy ( copyTarget , copySource ) ;
1790- assert . equal ( result . res . status , 200 ) ;
1791-
1792- const info = await ossObject . head ( copyTarget ) ;
1793- assert . equal ( info . status , 200 ) ;
1794- } ) ;
1795-
1796- it . skip ( 'should copy object from other bucket, sourceBucket is a separate parameter' , async ( ) => {
1797- const copySource = otherBucketObject ;
1798- const copyTarget = `${ prefix } oss-client/oss/has-bucket-name-copy-target.js` ;
1799- const result = await ossObject . copy ( copyTarget , copySource , otherBucket ) ;
1800- assert . equal ( result . res . status , 200 ) ;
1801-
1802- const info = await ossObject . head ( copyTarget ) ;
1803- assert . equal ( info . status , 200 ) ;
1804- } ) ;
1789+ // it.skip('should copy object from other bucket, sourceBucket in copySource', async () => {
1790+ // const copySource = `/${otherBucket}/${otherBucketObject}`;
1791+ // const copyTarget = `${prefix}oss-client/oss/copy-target.js`;
1792+ // const result = await ossObject.copy(copyTarget, copySource);
1793+ // assert.equal(result.res.status, 200);
1794+ //
1795+ // const info = await ossObject.head(copyTarget);
1796+ // assert.equal(info.status, 200);
1797+ // });
1798+
1799+ // it.skip('should copy object from other bucket, sourceBucket is a separate parameter', async () => {
1800+ // const copySource = otherBucketObject;
1801+ // const copyTarget = `${prefix}oss-client/oss/has-bucket-name-copy-target.js`;
1802+ // const result = await ossObject.copy(copyTarget, copySource, otherBucket);
1803+ // assert.equal(result.res.status, 200);
1804+ //
1805+ // const info = await ossObject.head(copyTarget);
1806+ // assert.equal(info.status, 200);
1807+ // });
18051808
18061809 it ( 'should copy object with non-english name' , async ( ) => {
18071810 const sourceName = `${ prefix } oss-client/oss/copy-meta_测试.js` ;
0 commit comments