Restore what the merge from main dropped from the carrier's own transit port
The merge kept main's version of compute(), the link actions and panels, the traceroute exit list and the CHANGELOG, so the city panel called a carryCtl() that no longer existed and routing never ranked a carrier's own port. Put the ranking back into compute() on top of the current rank lists and island split, along with setCarry, carryCtl, the traceroute carry flag, the reference loop in the routing test and the CHANGELOG bullet. Drop a stale label main had removed and sort the dictionaries. The tests follow main too: saves are read from their slot, RouteScript needs the core to run, Not That Telecom stands in for Cogentle (whose share is now small), and the flood test uses a smaller sacrificial PNI and IX flood because a carrier's own traffic now takes its share of the one transit port first.
This commit is contained in:
parent
296de1d946
commit
d9868a3757
14 changed files with 34 additions and 23 deletions
|
|
@ -31,7 +31,7 @@ test('at its own POP a carrier\'s port takes the traffic bound for that carrier,
|
|||
assert.ok(via(ev, lvl, 'lvl') > 1, 'Level Tree traffic goes out of the Level Tree port');
|
||||
assert.equal(via(ev, tly, 'lvl'), 0, 'and none of it out of Tell-Ya');
|
||||
assert.ok(via(ev, tly, 'tly') > 1 && via(ev, lvl, 'tly') === 0, 'the same for Tell-Ya');
|
||||
assert.ok(via(ev, lvl, 'cog') > 1 && via(ev, tly, 'cog') > 1, 'traffic for a carrier you have no port of still shares both ports');
|
||||
assert.ok(via(ev, lvl, 'ntt') > 1 && via(ev, tly, 'ntt') > 1, 'traffic for a carrier you have no port of still shares both ports');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ test('Prefer, Backup only and RouteScript keep the say they had', () => {
|
|||
assert.deepEqual(g.errors, []);
|
||||
// RouteScript's avoid transit is policy, and beats the shorter path.
|
||||
g = newYork(1, 150);
|
||||
g.ev("S.te={on:true,script:'avoid transit level tree'};compute()");
|
||||
g.ev("S.te={on:true,script:'avoid transit level tree'};S.core={lv:2,run:2,legacy:true};compute()");
|
||||
assert.ok(g.ev("!!teRules()"), 'the script is active');
|
||||
assert.equal(via(g.ev, g.lvl, 'lvl'), 0, 'avoid transit level tree keeps even its own traffic off it');
|
||||
assert.ok(via(g.ev, g.tly, 'lvl') > 1);
|
||||
|
|
@ -116,7 +116,7 @@ test('traceroute shows the exit that routing uses, and says why', () => {
|
|||
test('the carry setting is saved, repaired and optional', () => {
|
||||
const { ev, errors } = twoPops();
|
||||
ev(`ACT.setCarry({id:'${port(ev, 'lvl')}',on:1});save(true)`);
|
||||
const saved = ev("localStorage.getItem('sot-save-v1')");
|
||||
const saved = ev('slotRaw(UI.slot)');
|
||||
const again = load({ storage: { 'sot-save-v1': saved } });
|
||||
assert.equal(again.ev("S.transit.find(t=>t.net==='lvl').carry"), true, 'survives a reload');
|
||||
assert.equal(again.ev("S.transit.find(t=>t.net==='tly').carry"), undefined, 'and is off for the others');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue