@@ -338,8 +338,6 @@ describe('validateMethodChecksumNoChunking', () => {
338338 describe ( 'when checksum mismatches' , ( ) => {
339339 Object . keys ( checksumedMethods ) . forEach ( method => {
340340 it ( `should return BadDigest error for ${ method } when checksum mismatch` , async ( ) => {
341- config . integrityChecks [ method ] = true ;
342-
343341 const body = 'Hello, World!' ;
344342 const wrongMd5 = '1B2M2Y8AsgTpgAmY7PhCfg==' ;
345343 const request = {
@@ -360,8 +358,6 @@ describe('validateMethodChecksumNoChunking', () => {
360358 describe ( 'when checksum mismatches' , ( ) => {
361359 Object . keys ( checksumedMethods ) . forEach ( method => {
362360 it ( `should return InvalidDigest error for ${ method } when checksum mismatch` , async ( ) => {
363- config . integrityChecks [ method ] = true ;
364-
365361 const body = 'Hello, World!' ;
366362 const wrongMd5 = 'wrongchecksum123=' ;
367363 const request = {
@@ -382,8 +378,6 @@ describe('validateMethodChecksumNoChunking', () => {
382378 describe ( 'when no checksum is provided' , ( ) => {
383379 Object . keys ( checksumedMethods ) . forEach ( method => {
384380 it ( `should return null for ${ method } when no checksum is provided` , async ( ) => {
385- config . integrityChecks [ method ] = true ;
386-
387381 const body = 'Hello, World!' ;
388382 const request = {
389383 apiMethod : method ,
@@ -401,8 +395,6 @@ describe('validateMethodChecksumNoChunking', () => {
401395 describe ( 'when checksum matches' , ( ) => {
402396 Object . keys ( checksumedMethods ) . forEach ( method => {
403397 it ( `should return null for ${ method } when checksum matches` , async ( ) => {
404- config . integrityChecks [ method ] = true ;
405-
406398 const body = 'Hello, World!' ;
407399 const correctMd5 = crypto . createHash ( 'md5' ) . update ( body , 'utf8' ) . digest ( 'base64' ) ;
408400 const request = {
@@ -443,9 +435,8 @@ describe('validateMethodChecksumNoChunking', () => {
443435 } ) ;
444436
445437 describe ( 'when method is not in validation function mapping' , ( ) => {
446- it ( 'should return null for unsupported method even when enabled in config ' , async ( ) => {
438+ it ( 'should return null for unsupported method' , async ( ) => {
447439 const unsupportedMethod = 'someUnsupportedMethod' ;
448- config . integrityChecks [ unsupportedMethod ] = true ;
449440
450441 const body = 'Hello, World!' ;
451442 const wrongMd5 = 'wrongchecksum123=' ;
@@ -502,7 +493,6 @@ describe('validateMethodChecksumNoChunking', () => {
502493 const correctMd5 = crypto . createHash ( 'md5' ) . update ( body , 'utf8' ) . digest ( 'base64' ) ;
503494
504495 it ( 'should return null when Content-MD5 matches the body' , async ( ) => {
505- config . integrityChecks . completeMultipartUpload = true ;
506496 const request = {
507497 apiMethod : 'completeMultipartUpload' ,
508498 headers : { 'content-md5' : correctMd5 } ,
@@ -513,7 +503,6 @@ describe('validateMethodChecksumNoChunking', () => {
513503 } ) ;
514504
515505 it ( 'should return BadDigest when Content-MD5 does not match the body' , async ( ) => {
516- config . integrityChecks . completeMultipartUpload = true ;
517506 const request = {
518507 apiMethod : 'completeMultipartUpload' ,
519508 headers : { 'content-md5' : '1B2M2Y8AsgTpgAmY7PhCfg==' } ,
@@ -524,7 +513,6 @@ describe('validateMethodChecksumNoChunking', () => {
524513 } ) ;
525514
526515 it ( 'should return InvalidDigest when Content-MD5 is malformed' , async ( ) => {
527- config . integrityChecks . completeMultipartUpload = true ;
528516 const request = {
529517 apiMethod : 'completeMultipartUpload' ,
530518 headers : { 'content-md5' : 'wrongchecksum123=' } ,
@@ -535,7 +523,6 @@ describe('validateMethodChecksumNoChunking', () => {
535523 } ) ;
536524
537525 it ( 'should return null when no Content-MD5 header is present' , async ( ) => {
538- config . integrityChecks . completeMultipartUpload = true ;
539526 const request = {
540527 apiMethod : 'completeMultipartUpload' ,
541528 headers : { } ,
@@ -550,7 +537,6 @@ describe('validateMethodChecksumNoChunking', () => {
550537 // the other methods, this wrong x-amz-checksum-sha256 (treated
551538 // as a body digest) would return BadDigest. The md5-only path
552539 // must ignore it — the final-object validator handles it later.
553- config . integrityChecks . completeMultipartUpload = true ;
554540 const request = {
555541 apiMethod : 'completeMultipartUpload' ,
556542 headers : { 'x-amz-checksum-sha256' : 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=' } ,
0 commit comments