Close test-gap noise rows and sync coverage documentation.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Restore P1/P2/fleet/erasure COVERED rows in PROBLEMS.md with refreshed counts; drop fixed poll-duplication and Vitest-noise items. Silence ECONNREFUSED stderr in Vitest setup, alias download mock exports, and expand erasure/Path Tracer test coverage.
This commit is contained in:
AetherForge
2026-06-07 06:44:54 -07:00
parent 72ae457cca
commit 821a0e2cd7
14 changed files with 710 additions and 147 deletions

View File

@@ -0,0 +1,29 @@
package api
import (
"testing"
"crypto-miner-server/internal/db"
"crypto-miner-server/internal/models"
)
func TestBuildSpreadRouterInputErasureFlag(t *testing.T) {
database, err := db.New(t.TempDir())
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() { _ = database.Close() })
hub := NewWSHub(database)
hub.SetServerPolicy(ServerPolicy{ErasureLanesEnabled: true})
if err := database.UpsertAgent(&models.Agent{ID: "router-seed", Name: "Seed", IP: "10.9.8.9", Status: "online"}); err != nil {
t.Fatal(err)
}
connectTestAgent(t, hub, "router-seed")
waitForHubAgents(t, hub, "router-seed")
in := buildSpreadRouterInput(hub, nil, []string{"10.9.8"}, "do_peer")
if !in.ErasureLanesEnabled {
t.Fatal("expected erasure_lanes_enabled on spread router input")
}
}