diff --git a/seaweed-block/cmd/sw-block/chunk_gc_integration_test.go b/seaweed-block/cmd/sw-block/chunk_gc_integration_test.go index 40fe200542..92d2e90d13 100644 --- a/seaweed-block/cmd/sw-block/chunk_gc_integration_test.go +++ b/seaweed-block/cmd/sw-block/chunk_gc_integration_test.go @@ -102,7 +102,24 @@ func TestIntegration_OpsChunkGC_RealMasterAndStore(t *testing.T) { h.Holder = "holder-a" h.RemoteLSN = 1 h.Chunks = map[uint64]storage.ChunkRef{0: {Key: "live", SHA256: sha256.Sum256(data)}} + flat := h + segmented, segmentIntents, err := remote.PrepareManifest(ctx, flat, h, 8*4096) + if err != nil { + t.Fatal(err) + } + h = segmented h.Gen, err = remote.CASHead(ctx, storage.ChunkHeadVersion{Gen: h.Gen, Epoch: 0}, h) + if err == nil { + for _, id := range segmentIntents { + if err = remote.DeleteIntent(ctx, id); err != nil { + t.Fatal(err) + } + } + } + if h.Segments == nil || len(h.Segments) != 1 { + t.Fatal("real-service acceptance requires a segmented root") + } + if err != nil { t.Fatal(err) }