s3: do not retry when testing config

This commit is contained in:
Girish Ramakrishnan
2020-05-12 22:45:01 -07:00
parent bd3ee0fa24
commit 101dc3a93c

View File

@@ -30,7 +30,8 @@ var assert = require('assert'),
https = require('https'),
PassThrough = require('stream').PassThrough,
path = require('path'),
S3BlockReadStream = require('s3-block-read-stream');
S3BlockReadStream = require('s3-block-read-stream'),
_ = require('underscore');
// test only
var originalAWS;
@@ -429,7 +430,7 @@ function testConfig(apiConfig, callback) {
Body: 'testcontent'
};
var s3 = new AWS.S3(credentials);
var s3 = new AWS.S3(_.omit(credentials, 'retryDelayOptions', 'maxRetries'));
s3.putObject(params, function (error) {
if (error) return callback(new BoxError(BoxError.EXTERNAL_ERROR, error.message || error.code)); // DO sets 'code'