(authInfo, bucketName, expectedListingLength, done)
| 74 | |
| 75 | |
| 76 | function checkBucketListing(authInfo, bucketName, expectedListingLength, done) { |
| 77 | return serviceGet(authInfo, serviceGetRequest, log, (err, data) => { |
| 78 | parseString(data, (err, result) => { |
| 79 | if (expectedListingLength > 0) { |
| 80 | assert.strictEqual(result.ListAllMyBucketsResult |
| 81 | .Buckets[0].Bucket.length, expectedListingLength); |
| 82 | assert.strictEqual(result.ListAllMyBucketsResult |
| 83 | .Buckets[0].Bucket[0].Name[0], bucketName); |
| 84 | } else { |
| 85 | assert.strictEqual(result.ListAllMyBucketsResult |
| 86 | .Buckets[0].length, 0); |
| 87 | } |
| 88 | done(); |
| 89 | }); |
| 90 | }); |
| 91 | } |
| 92 | |
| 93 | function confirmDeleted(done) { |
| 94 | // Note that we need the process.nextTick's because of the |
no test coverage detected