Keep the Connections list working with 400G fabric ports (#342)

This commit is contained in:
Germain Carré 2026-11-11 15:35:50 +01:00 • committed by GitHub
parent e27e9e3066
commit e2b3615a19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View file

@ -136,3 +136,15 @@ test('saves: fabric ports that make no sense are dropped, LAGs are kept in bound
assert.equal(ev('R.cost.nni'), 500, 'a 10G port from before costs what it did');
assert.deepEqual(errors, []);
});
test('a 400G fabric port in the Connections list offers a LAG member and no faster port, whatever the sort', () => {
const { ev, errors } = open();
ev(`S.pops.fra.rgen=${fast(5)};ACT.buyNni({city:"fra",prov:FB,tier:2});compute()`);
assert.ok(ev('portShown(3)'), 'an 800G port is on sale, so nothing stops the list from offering one');
for (const [k, cf] of [['use', '{}'], ['k', "{k:'nni'}"]]) {
const h = ev(`UI.connSort='${k}';UI.connDir=-1;UI.cf=${cf};connSection()`);
assert.match(h, /data-act="lagNni"/, `sorted by ${k}`);
assert.doesNotMatch(h, /data-act="buyNni"/, `sorted by ${k}: no 800G fabric port`);
}
assert.deepEqual(errors, []);
});