Close test-gap noise rows and sync coverage documentation.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
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:
29
server/internal/api/spreadrouter_bridge_test.go
Normal file
29
server/internal/api/spreadrouter_bridge_test.go
Normal 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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user