tap.test('lrtime is a function or undefined', function(t) { var lrtime = app.appmetrics.lrtime; if (lrtime) { t.doesNotThrow(lrtime, 'callable, not just present'); } else { t.notEqual(process.platform, 'linux', 'lrtime mandatory on linux'); } t.end(); });
test('validateCIDRList', (t) => { t.plan(10) const single = ['127.0.0.0/24'] const double = ['127.0.0.0/24', '192.168.0.0/16'] const ipv6 = '2620:0:2d0:200::7/32' const ipv6Mixed = ['127.0.0/24', '2620:0:2d0:200::7/32', '192.168.0.0/16'] t.doesNotThrow(() => t.isDeeply(validateCIDRList(single.join(',')), single), 'single string ipv4') t.doesNotThrow(() => t.isDeeply(validateCIDRList(single), single), 'single array ipv4') t.doesNotThrow(() => t.isDeeply(validateCIDRList(double.join(',')), double), 'double string ipv4') t.doesNotThrow(() => t.isDeeply(validateCIDRList(double), double), 'double array ipv4') t.throws(() => validateCIDRList(ipv6)) t.throws(() => validateCIDRList(ipv6Mixed)) t.done() })
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');
test('no opts does not break handleOrProxy', function t(assert) { var ringpop = createRingpop(); ringpop.lookup = function() { return '127.0.0.1:3001'; }; ringpop.requestProxy = mock.requestProxy; var key = 'KEY0'; var req = {}; var res = {}; var opts = null; var handleOrProxy = ringpop.handleOrProxy.bind(ringpop, key, req, res, opts); assert.doesNotThrow(handleOrProxy, null, 'handleOrProxy does not throw'); ringpop.destroy(); assert.end(); });
test('no seed is OK', function t(assert) { assert.doesNotThrow(function it() { /* jshint nonew: false */ new Config(null); }); assert.end(); });
test('no seed is OK', function t(assert) { assert.doesNotThrow(function it() { /* jshint nonew: false */ new Config(null); }); assert.end(); });
test('no opts does not break handleOrProxy', function t(assert) { var ringpop = createRingpop(); ringpop.lookup = function() { return '127.0.0.1:3001'; }; ringpop.requestProxy = mock.requestProxy; var key = 'KEY0'; var req = {}; var res = {}; var opts = null; var handleOrProxy = ringpop.handleOrProxy.bind(ringpop, key, req, res, opts); assert.doesNotThrow(handleOrProxy, null, 'handleOrProxy does not throw'); ringpop.destroy(); assert.end(); });
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');
assert.doesNotThrow(function () { validateRBTree(tree.root); }, false, 'tree is a valid red black tree');