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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user