From c93f2e1ddc0ddd84f2f94ac5f4e0f3a6e96edaf6 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sun, 29 Nov 2026 01:22:07 -0800 Subject: [PATCH] test: the process-level restore ladder expects restore_source_not_own A restore from a restore target's snapshot now refuses with the typed code; the two ladder checks still read the old not_admitted. Co-Authored-By: Claude Opus 5.5 --- .../cmd/blockvolume/snapshot_ladder_integration_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/seaweed-block/cmd/blockvolume/snapshot_ladder_integration_test.go b/seaweed-block/cmd/blockvolume/snapshot_ladder_integration_test.go index 37eae406bf..433bd262f3 100644 --- a/seaweed-block/cmd/blockvolume/snapshot_ladder_integration_test.go +++ b/seaweed-block/cmd/blockvolume/snapshot_ladder_integration_test.go @@ -393,8 +393,8 @@ func TestSnapshotLadderB1SnapshotQuery(t *testing.T) { } out, errOut, code := env.h.run(t, "ops", "chunk", "restore", "--master", env.h.masterAddr, "--source", "v2", "--snapshot", "x", "--target", "v3", "--chunk-filer", env.cluster.filerGRPC, "--chunk-path", env.chunkPath) - if code == 0 || !strings.Contains(out, `"code":"not_admitted"`) || !strings.Contains(out, "names another volume's chunks") { - t.Fatalf("restore from a restore target's snapshot: exit %d, want not_admitted naming another volume's chunks\n%s\n%s", code, out, errOut) + if code == 0 || !strings.Contains(out, `"code":"restore_source_not_own"`) || !strings.Contains(out, "names another volume's chunks") { + t.Fatalf("restore from a restore target's snapshot: exit %d, want restore_source_not_own naming another volume's chunks\n%s\n%s", code, out, errOut) } } @@ -679,8 +679,8 @@ func TestSnapshotLadderC3RestoreThenWriteThenSnapshotIt(t *testing.T) { out, errOut, code := env.h.run(t, "ops", "chunk", "restore", "--master", env.h.masterAddr, "--source", "v2", "--snapshot", "mine", "--target", "v3", "--chunk-filer", env.cluster.filerGRPC, "--chunk-path", env.chunkPath) - if code == 0 || !strings.Contains(out, `"code":"not_admitted"`) || !strings.Contains(out, "names another volume's chunks") { - t.Fatalf("restore from the restored volume's snapshot: exit %d, want not_admitted naming another volume's chunks\n%s\n%s", code, out, errOut) + if code == 0 || !strings.Contains(out, `"code":"restore_source_not_own"`) || !strings.Contains(out, "names another volume's chunks") { + t.Fatalf("restore from the restored volume's snapshot: exit %d, want restore_source_not_own naming another volume's chunks\n%s\n%s", code, out, errOut) } env.requireImage(t, "n-v2", mergeImages(src, own, ownLater), srcLater) env.restoreInto(t, "v1", "base", "v4") // the source's snapshot is unchanged