(sampleXml, done)
| 40 | const testGetCorsRequest = _makeCorsRequest(); |
| 41 | |
| 42 | function _comparePutGetXml(sampleXml, done) { |
| 43 | const fullXml = '<?xml version="1.0" encoding="UTF-8" ' + |
| 44 | 'standalone="yes"?><CORSConfiguration>' + |
| 45 | `${sampleXml}</CORSConfiguration>`; |
| 46 | const testPutCorsRequest = _makeCorsRequest(fullXml); |
| 47 | bucketPutCors(authInfo, testPutCorsRequest, log, err => { |
| 48 | if (err) { |
| 49 | process.stdout.write(`Err putting cors config ${err}`); |
| 50 | return done(err); |
| 51 | } |
| 52 | return bucketGetCors(authInfo, testGetCorsRequest, log, |
| 53 | (err, res) => { |
| 54 | assert.strictEqual(err, null, `Unexpected err ${err}`); |
| 55 | assert.strictEqual(res, fullXml); |
| 56 | done(); |
| 57 | }); |
| 58 | }); |
| 59 | } |
| 60 | |
| 61 | describe('getBucketCors API', () => { |
| 62 | beforeEach(done => { |
no test coverage detected