From 4bf126944fec9bcb1df1745c0357e30c87cc61b7 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 9 Aug 2026 23:56:21 -0700 Subject: [PATCH] format: assert the chunk count in the align-clamp cutter test --- weed/format/layout_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/format/layout_test.go b/weed/format/layout_test.go index f599f4eea..4256ba624 100644 --- a/weed/format/layout_test.go +++ b/weed/format/layout_test.go @@ -144,6 +144,9 @@ func TestCutterAlignLargerThanChunkLimit(t *testing.T) { layout := &Layout{Format: "x", ExtentSizes: []int64{20}, Align: 8} chunks := collectChunks(t, layout.Cutter(5)) want := [][2]int64{{0, 8}, {8, 8}, {16, 4}} + if len(chunks) != len(want) { + t.Fatalf("chunks = %v, want %v", chunks, want) + } for i := range want { if chunks[i] != want[i] { t.Fatalf("chunk %d = %v, want %v", i, chunks[i], want[i])