@@ -448,25 +448,23 @@ describe('prepareRequestContexts', () => {
448448 } ) ;
449449 } ) ;
450450
451- describe ( 'x-amz-version-id header ' , ( ) => {
452- it ( 'should return version-specific actions with x-amz-version-id ' , ( ) => {
451+ describe ( 'versionId query param ' , ( ) => {
452+ it ( 'should return version-specific actions with versionId query param ' , ( ) => {
453453 const apiMethod = 'objectGetAttributes' ;
454- const request = makeRequest ( {
455- 'x-amz-version-id' : '0987654323456789' ,
456- } ) ;
454+ const request = makeRequest ( { } , { versionId : '0987654323456789' } ) ;
457455 const results = prepareRequestContexts ( apiMethod , request , sourceBucket , sourceObject , sourceVersionId ) ;
458456
459457 assert . strictEqual ( results . length , 2 ) ;
460458 assert . strictEqual ( results [ 0 ] . getAction ( ) , 's3:GetObjectVersion' ) ;
461459 assert . strictEqual ( results [ 1 ] . getAction ( ) , 's3:GetObjectVersionAttributes' ) ;
462460 } ) ;
463461
464- it ( 'should include scality:GetObjectAttributes with x-amz-version-id and x-amz-meta' , ( ) => {
462+ it ( 'should include scality:GetObjectAttributes with versionId query param and x-amz-meta' , ( ) => {
465463 const apiMethod = 'objectGetAttributes' ;
466- const request = makeRequest ( {
467- 'x-amz-version-id ' : '0987654323456789' ,
468- 'x-amz-object-attributes' : 'x-amz-meta-department' ,
469- } ) ;
464+ const request = makeRequest (
465+ { 'x-amz-object-attributes ' : 'x-amz-meta-department' } ,
466+ { versionId : '0987654323456789' }
467+ ) ;
470468 const results = prepareRequestContexts ( apiMethod , request , sourceBucket , sourceObject , sourceVersionId ) ;
471469
472470 assert . strictEqual ( results . length , 3 ) ;
0 commit comments