mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
test: trace immutable segments through real blockmaster and filer GC
This commit is contained in:
1 parent
b715c8f7b8
commit
4479bd4361
1 file changed
+17
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user