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

@@ -72,6 +72,31 @@ func TestDecodeInsufficientShards(t *testing.T) {
}
}
func TestEncodeRejectsEmptyPayload(t *testing.T) {
if _, _, err := Encode(nil, DefaultParams()); err == nil {
t.Fatal("expected error for empty payload")
}
}
func TestParamsNormalizeInvalid(t *testing.T) {
if _, err := (Params{DataShards: 0, ParityShards: 0}).Normalize(); err != nil {
t.Fatalf("zero values should normalize: %v", err)
}
if _, err := (Params{DataShards: -1, ParityShards: 1}).Normalize(); err == nil {
t.Fatal("expected error for negative data shards")
}
if _, err := (Params{DataShards: 200, ParityShards: 100}).Normalize(); err == nil {
t.Fatal("expected error for too many shards")
}
}
func TestParamsShardCounts(t *testing.T) {
p := Params{DataShards: 4, ParityShards: 2}
if p.MinShards() != 4 || p.TotalShards() != 6 {
t.Fatalf("min=%d total=%d", p.MinShards(), p.TotalShards())
}
}
func TestBuildPlanStoresShards(t *testing.T) {
store := NewShardStore()
payload := []byte("lane-plan-payload")