makeVeeamRequest - utility function to generate a request going * through veeam route * @param {object} params - params for making request * @param {string} params.method - request method * @param {string} params.bucket - bucket name * @param {string} params.objectKey - object key * @param {ob
(params, callback)
| 117 | * @return {undefined} - and call callback |
| 118 | */ |
| 119 | function makeVeeamRequest(params, callback) { |
| 120 | const { method, headers, bucket, objectKey, |
| 121 | authCredentials, requestBody, queryObj } = params; |
| 122 | const options = { |
| 123 | authCredentials, |
| 124 | hostname: ipAddress, |
| 125 | port: 8000, |
| 126 | method, |
| 127 | headers, |
| 128 | path: `/_/veeam/${bucket}/${objectKey}`, |
| 129 | urlForSignature: `/${bucket}/${objectKey}`, |
| 130 | requestBody, |
| 131 | jsonResponse: false, |
| 132 | queryObj, |
| 133 | }; |
| 134 | makeRequest(options, callback); |
| 135 | } |
| 136 | |
| 137 | (process.env.S3METADATA === 'mongodb' ? describe : describe.skip)('Veeam routes:', () => { |
| 138 | let scuba; |
no test coverage detected