MCPcopy Index your code
hub / github.com/scality/cloudserver / checkGeneratedID

Function checkGeneratedID

tests/unit/api/bucketPutReplication.js:28–40  ·  view source on GitHub ↗
(xml, cb)

Source from the content-addressed store, hash-verified

26
27// Check that the ID has been created properly.
28function checkGeneratedID(xml, cb) {
29 getReplicationConfiguration(xml, log, (err, res) => {
30 if (err) {
31 return cb(err);
32 }
33 const id = res.rules[0].id;
34 assert.strictEqual(typeof id, 'string', 'expected rule ID to be ' +
35 `string but got ${typeof id}`);
36 assert.strictEqual(id.length, 48, 'expected rule ID to be a length ' +
37 `of 48 but got ${id.length}`);
38 return cb();
39 });
40}
41
42// Create replication configuration XML with an tag optionally omitted.
43function createReplicationXML(missingTag, tagValue) {

Callers 1

Calls 1

Tested by

no test coverage detected