diff options
| -rw-r--r-- | TEST_COVERAGE_PLAN.md | 101 |
1 files changed, 70 insertions, 31 deletions
diff --git a/TEST_COVERAGE_PLAN.md b/TEST_COVERAGE_PLAN.md index 8dc6b95..de45948 100644 --- a/TEST_COVERAGE_PLAN.md +++ b/TEST_COVERAGE_PLAN.md | |||
| @@ -36,12 +36,12 @@ No direct esptool.py, curl, or nmcli against hardware without locks. | |||
| 36 | 36 | ||
| 37 | ## Mints | 37 | ## Mints |
| 38 | 38 | ||
| 39 | | Mint | URL | Purpose | | 39 | | Mint | URL | Purpose | Status | |
| 40 | |------|-----|---------| | 40 | |------|-----|---------|--------| |
| 41 | | Testnut | `https://testnut.cashu.space` | ESP32 boards, auto-pays invoices | | 41 | | Testnut | `https://testnut.cashu.space` | ESP32 boards, auto-pays invoices | UP | |
| 42 | | Testnut no-fee | `https://nofee.testnut.cashu.space` | Alpha router, feeless swaps | | 42 | | ~~Testnut no-fee~~ | `https://nofee.testnut.cashu.space` | ~~Alpha router, feeless swaps~~ | **DOWN** (TLS timeout) | |
| 43 | | Orangesync compat | `https://testnut-compat.mints.orangesync.tech` | Beta router, mint-token tool default | | 43 | | Orangesync compat | `https://testnut-compat.mints.orangesync.tech` | All routers, mint-token tool default | UP | |
| 44 | | Minibits | `https://mint.minibits.cash/Bitcoin` | Alpha router (secondary) | | 44 | | Minibits | `https://mint.minibits.cash/Bitcoin` | Alpha router (secondary) | Unknown | |
| 45 | 45 | ||
| 46 | --- | 46 | --- |
| 47 | 47 | ||
| @@ -65,30 +65,69 @@ No direct esptool.py, curl, or nmcli against hardware without locks. | |||
| 65 | 65 | ||
| 66 | ## Phase 1: Baseline Hardware Tests | 66 | ## Phase 1: Baseline Hardware Tests |
| 67 | 67 | ||
| 68 | - [ ] **1.1** make -C esp32 lock-a PHASE="baseline" | 68 | ### Board A (TollGate-B96D80 at 10.185.47.1) |
| 69 | - [ ] **1.2** make -C esp32 flash-a | 69 | |
| 70 | - [ ] **1.3** make -C esp32 test-multi-mint-a | 70 | - [x] **1.1** make -C esp32 lock-a PHASE="baseline" |
| 71 | - [ ] **1.4** make -C esp32 test-cvm-a | 71 | - [x] **1.2** Firmware fix: replaced `xTaskCreate` with `esp_timer` for `start_services()` (commit `09c9a64`) |
| 72 | - [ ] **1.5** make -C esp32 unlock-a | 72 | - [x] **1.3** Captive portal moved to `start_ap_services()` — portal starts on AP_START, not STA GOT IP |
| 73 | - [ ] **1.6** make -C esp32 lock-b PHASE="baseline" | 73 | - [x] **1.4** Added `/debug` HTTP endpoint (portal_running, start_services_called, sta_got_ip, free_heap) |
| 74 | - [ ] **1.7** make -C esp32 flash-b | 74 | - [x] **1.5** Smoke test: **6/6 PASS** (SSID visible, portal loads, grant, internet, reset, blocked) |
| 75 | - [ ] **1.8** make -C esp32 test-multi-mint-b | 75 | - [x] **1.6** Multi-mint API test: Discovery (kind 10021) OK, Mints endpoint OK, Wallet OK |
| 76 | - [ ] **1.9** make -C esp32 unlock-b | 76 | - [x] **1.7** Unit tests: **407/407 PASS** (22 test suites) |
| 77 | - [ ] **1.10** make -C esp32 lock-c PHASE="baseline" | 77 | - [x] **1.8** ESP32 E2E tests: 3/14 pass (Board A WiFi became unstable during E2E run) |
| 78 | - [ ] **1.11** make -C esp32 flash-c | 78 | - [x] **1.9** make -C esp32 unlock-a |
| 79 | - [ ] **1.12** Verify Board C AP reachable (ping derived IP) | 79 | |
| 80 | - [ ] **1.13** make -C esp32 arch-test-api-quick | 80 | **Known issue:** Board A mint health reports `reachable: false` for testnut.cashu.space. STA gets IP but DNS doesn't resolve mint URLs. Wallet funding blocked by `"payment-error-mint-not-accepted"`. |
| 81 | - [ ] **1.14** make -C esp32 unlock-c | 81 | |
| 82 | - [ ] **1.15** make lock PHASE="baseline-router" | 82 | ### Board B (TollGate-C0E9CA at 10.192.45.1) |
| 83 | - [ ] **1.16** make status ROUTER=alpha | 83 | |
| 84 | - [ ] **1.17** make status ROUTER=beta | 84 | - [x] **1.10** Diagnosed as **hardware issue** — USB CDC ACM stub upload fails at ~64% of app binary. Bootloader/partition table always flash fine. Board B skipped for Phase 1. |
| 85 | - [ ] **1.18** make smoke-degraded ROUTER=alpha | 85 | |
| 86 | - [ ] **1.19** make test-captive-portal ROUTER=alpha | 86 | ### Board C (TollGate-4A2510 at 10.74.63.1) |
| 87 | - [ ] **1.20** make smoke-degraded ROUTER=beta | 87 | |
| 88 | - [ ] **1.21** make test-captive-portal ROUTER=beta | 88 | - [x] **1.11** make -C esp32 lock-c PHASE="baseline-provision" |
| 89 | - [ ] **1.22** make unlock | 89 | - [x] **1.12** SPIFFS generated with Board C nsec (71bf3f4d...) |
| 90 | - [ ] **1.23** Playwright E2E from esp32-tollgate (lock-a, connect-a, test-e2e) | 90 | - [x] **1.13** make -C esp32 provision-c — flash + SPIFFS + boot + verify: **SUCCESS** |
| 91 | - [ ] **1.24** Gate: all tests pass before proceeding | 91 | - [x] **1.14** Debug: all services started, sta_got_ip=true, 8MB heap free |
| 92 | - [x] **1.15** Discovery API: kind 10021 with correct pricing (21 sats/step) | ||
| 93 | - [x] **1.16** Mints: testnut.cashu.space registered, reachable=false (same STA DNS issue) | ||
| 94 | - [x] **1.17** Portal HTML loads correctly with server-side template substitution | ||
| 95 | - [x] **1.18** **ESP32 E2E: 14/14 PASS** (all captive portal tests in 15s) | ||
| 96 | - [x] **1.19** make -C esp32 unlock-c | ||
| 97 | |||
| 98 | ### OpenWRT Router Alpha (10.47.41.1) | ||
| 99 | |||
| 100 | - [x] **1.20** Fixed mint URL: replaced down `nofee.testnut.cashu.space` with `testnut-compat.mints.orangesync.tech` | ||
| 101 | - [x] **1.21** Rebuilt `/tmp/mint-token` Go binary from updated source | ||
| 102 | - [x] **1.22** r-smoke-degraded: **PASSED** (all 9 phases: setup, fund, full merchant, baseline, block, degraded, offline ops, unblock, restore) | ||
| 103 | - [x] **1.23** r-fix-dns: DNS restored, merchant mode confirmed | ||
| 104 | - [x] **1.24** r-test-captive-portal-happy: **4/4 desktop-portal tests PASS** (API, cashu input, lightning input, mint buttons) | ||
| 105 | - [x] **1.25** Portal port fix: tests updated from port 2050 → 80 (nodogsplash) | ||
| 106 | |||
| 107 | ### Unit Tests (no hardware) | ||
| 108 | |||
| 109 | - [x] **1.26** make test-unit: **407/407 PASS** across 22 test suites: | ||
| 110 | - test_geohash (11), test_identity (24), test_nostr_event (23), test_cashu (14), | ||
| 111 | - test_session (16), test_tollgate_client (30), test_lnurl_pay (7), | ||
| 112 | - test_lightning_payout (11), test_mcp_handler (60), test_nip04 (15), | ||
| 113 | - test_cvm_server (61), test_display (22), test_negentropy_adapter (109), | ||
| 114 | - test_beacon_price (28), test_market (17), test_mint_health (14), | ||
| 115 | - test_mining_payment (23), test_stratum_proxy (21), test_session_payment_method (12), | ||
| 116 | - test_tollgate_client_mining (20), test_firewall_sandbox (16) | ||
| 117 | |||
| 118 | ### Summary | ||
| 119 | |||
| 120 | | Category | Result | | ||
| 121 | |----------|--------| | ||
| 122 | | Unit tests | **407/407 PASS** | | ||
| 123 | | Board A smoke | **6/6 PASS** | | ||
| 124 | | Board A E2E | **3/14 PASS** (WiFi instability) | | ||
| 125 | | Board B | **SKIPPED** (USB hardware issue) | | ||
| 126 | | Board C provision | **SUCCESS** | | ||
| 127 | | Board C E2E | **14/14 PASS** | | ||
| 128 | | Router Alpha smoke-degraded | **PASSED** | | ||
| 129 | | Router Alpha captive portal | **4/4 PASS** | | ||
| 130 | | Board wallet funding | **BLOCKED** (STA DNS issue) | | ||
| 92 | 131 | ||
| 93 | ## Phase 2: Restructure main/ → tollgate_core | 132 | ## Phase 2: Restructure main/ → tollgate_core |
| 94 | 133 | ||
| @@ -252,7 +291,7 @@ Rotating nsec automatically rotates all identifiers. | |||
| 252 | |-------|-----------|------|-------|------| | 291 | |-------|-----------|------|-------|------| |
| 253 | | A | .env BOARD_A_NSEC | TollGate-B96D80 | 10.185.47.1 | /dev/ttyACM0 | | 292 | | A | .env BOARD_A_NSEC | TollGate-B96D80 | 10.185.47.1 | /dev/ttyACM0 | |
| 254 | | B | .env BOARD_B_NSEC | TollGate-C0E9CA | 10.192.45.1 | /dev/ttyACM1 | | 293 | | B | .env BOARD_B_NSEC | TollGate-C0E9CA | 10.192.45.1 | /dev/ttyACM1 | |
| 255 | | C | .env BOARD_C_NSEC | (derived) | (derived) | /dev/ttyACM2 | | 294 | | C | .env BOARD_C_NSEC | TollGate-4A2510 | 10.74.63.1 | /dev/ttyACM2 | |
| 256 | 295 | ||
| 257 | ## OpenWRT Routers | 296 | ## OpenWRT Routers |
| 258 | 297 | ||