diff options
| author | Your Name <you@example.com> | 2026-05-19 13:21:39 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-19 13:21:39 +0530 |
| commit | b0d9d494f00ee77f9efc22d1ef2ea3c94b23ddbd (patch) | |
| tree | df582b5456b22359ebd1d9be2eba5755ca104f97 | |
| parent | fe6aa9663d4cdabdc6e71db6068f8cd9e3739ffe (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.mjs | 4 |
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 { |