MCPcopy
hub / github.com/scality/cloudserver / checkBucketListing

Function checkBucketListing

tests/unit/api/deletedFlagBucket.js:76–91  ·  view source on GitHub ↗
(authInfo, bucketName, expectedListingLength, done)

Source from the content-addressed store, hash-verified

74
75
76function 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
93function confirmDeleted(done) {
94 // Note that we need the process.nextTick's because of the

Callers 2

confirmDeletedFunction · 0.85

Calls 1

serviceGetFunction · 0.85

Tested by

no test coverage detected