v0.297.0: burn-down round 2 — 24 small rows (R-591 R-568 R-567 R-363 R-547 R-10 R-552 R-251 R-104 R-619 R-362 R-675 R-256 R-257 R-240 R-365 R-425 R-565 R-564 R-603 R-454 R-208 R-457-swept) + the banner countdown and deepCopyStack twins; MinAgent 0.131.0
gates / gates (push) Failing after 50s
gates / gates (push) Failing after 50s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/agentapi"
|
||||
)
|
||||
|
||||
// R-568: the agent answers /disks in an order that is not stable between calls; the card listed
|
||||
// the same two disks in the opposite order a minute apart. Feed both orders and expect ONE order.
|
||||
func TestDiskHealthRows_OrderIsStable(t *testing.T) {
|
||||
ok := &agentapi.SmartSummary{Health: agentapi.SmartPassed}
|
||||
a := physDisk("nvme0n1", ok)
|
||||
b := physDisk("sda", ok)
|
||||
labels := func(order ...agentapi.DiskInfo) []string {
|
||||
h := newDiskHarness(t) // fresh harness: the 60 s card cache must not answer for the second order
|
||||
h.set(order...)
|
||||
var out []string
|
||||
for _, r := range h.s.diskHealthRows(context.Background()) {
|
||||
out = append(out, r.Label)
|
||||
}
|
||||
return out
|
||||
}
|
||||
ab := labels(a, b)
|
||||
ba := labels(b, a)
|
||||
if len(ab) != 2 || len(ba) != 2 {
|
||||
t.Fatalf("want two rows each, got %v and %v", ab, ba)
|
||||
}
|
||||
if ab[0] != ba[0] || ab[1] != ba[1] {
|
||||
t.Errorf("R-568: the same two disks render in a different order depending on the agent's order: %v vs %v", ab, ba)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user