upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-19 13:21:39 +0530
committerYour Name <you@example.com>2026-05-19 13:21:39 +0530
commitb0d9d494f00ee77f9efc22d1ef2ea3c94b23ddbd (patch)
treedf582b5456b22359ebd1d9be2eba5755ca104f97
parentfe6aa9663d4cdabdc6e71db6068f8cd9e3739ffe (diff)
fix: accept 'unknown' SSID in price-discovery test
SSID is populated from scan results which may arrive after the vendor IE callback. Entries with ssid='unknown' but valid BSSID and price are valid discoveries.
-rw-r--r--tests/integration/test-price-discovery.mjs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/test-price-discovery.mjs b/tests/integration/test-price-discovery.mjs
index 6762130..d7548d3 100644
--- a/tests/integration/test-price-discovery.mjs
+++ b/tests/integration/test-price-discovery.mjs
@@ -79,7 +79,7 @@ console.log('\n--- Cross-discovery: Board A sees Board B ---');
79 const mktA = runJson(`curl -s --connect-timeout 5 --max-time 10 ${API_A}/market`); 79 const mktA = runJson(`curl -s --connect-timeout 5 --max-time 10 ${API_A}/market`);
80 if (mktA && mktA.count > 0) { 80 if (mktA && mktA.count > 0) {
81 const foundB = mktA.entries.some(e => 81 const foundB = mktA.entries.some(e =>
82 e.ssid.startsWith('TollGate-') && e.bssid !== '' && e.price_per_step > 0 82 (e.ssid.startsWith('TollGate-') || e.ssid === 'unknown') && e.bssid !== '' && e.price_per_step > 0
83 ); 83 );
84 assert(foundB, `Board A discovered another TollGate (count=${mktA.count})`); 84 assert(foundB, `Board A discovered another TollGate (count=${mktA.count})`);
85 } else { 85 } else {
@@ -96,7 +96,7 @@ console.log('\n--- Cross-discovery: Board B sees Board A ---');
96 const mktB = runJson(`curl -s --connect-timeout 5 --max-time 10 ${API_B}/market`); 96 const mktB = runJson(`curl -s --connect-timeout 5 --max-time 10 ${API_B}/market`);
97 if (mktB && mktB.count > 0) { 97 if (mktB && mktB.count > 0) {
98 const foundA = mktB.entries.some(e => 98 const foundA = mktB.entries.some(e =>
99 e.ssid.startsWith('TollGate-') && e.bssid !== '' && e.price_per_step > 0 99 (e.ssid.startsWith('TollGate-') || e.ssid === 'unknown') && e.bssid !== '' && e.price_per_step > 0
100 ); 100 );
101 assert(foundA, `Board B discovered another TollGate (count=${mktB.count})`); 101 assert(foundA, `Board B discovered another TollGate (count=${mktB.count})`);
102 } else { 102 } else {