From 30b99055ace148cb0b9883015116ad17f340a762 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sun, 29 Nov 2026 10:42:20 -0800 Subject: [PATCH] test: preserve the missing-filer refusal control --- seaweed-block/cmd/blockvolume/chunk_remote_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/seaweed-block/cmd/blockvolume/chunk_remote_test.go b/seaweed-block/cmd/blockvolume/chunk_remote_test.go index 6bec9a4202..ad7c1ead84 100644 --- a/seaweed-block/cmd/blockvolume/chunk_remote_test.go +++ b/seaweed-block/cmd/blockvolume/chunk_remote_test.go @@ -56,7 +56,7 @@ func TestWALStoreChunkFlags(t *testing.T) { t.Fatalf("walstore with the chunk defaults untouched: %v", err) } refused := map[string][]string{ - "no filer": base("--durable-root=/tmp/sw-block", "--durable-impl=walstore-chunk"), + "no filer": base("--durable-root=/tmp/sw-block", "--durable-impl=walstore-chunk", "--workspace-lease"), "no durable root": base("--durable-impl=walstore-chunk", "--workspace-lease", "--chunk-filer=127.0.0.1:18888"), "relative path": base("--durable-root=/tmp/sw-block", "--durable-impl=walstore-chunk", "--workspace-lease", "--chunk-filer=x:1", "--chunk-path=swblock"), "root path": base("--durable-root=/tmp/sw-block", "--durable-impl=walstore-chunk", "--workspace-lease", "--chunk-filer=x:1", "--chunk-path=/"), @@ -75,8 +75,11 @@ func TestWALStoreChunkFlags(t *testing.T) { "interval on walstore": base("--durable-root=/tmp/sw-block", "--durable-impl=walstore", "--chunk-capture-interval=5s"), } for name, args := range refused { - if _, err := parseFlags(args); err == nil { + _, err := parseFlags(args) + if err == nil { t.Errorf("%s: parseFlags succeeded; want an error", name) + } else if name == "no filer" && !strings.Contains(err.Error(), "requires --chunk-filer") { + t.Errorf("missing filer refused for wrong reason: %v", err) } } }