mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
test: inspect the volume binding list explicitly
This commit is contained in:
1 parent
5a2fe0c657
commit
11079b620a
1 file changed
+2
-2
@@ -36,7 +36,7 @@ func TestWorkspaceRPCSameHostCleanMoveKeepsRepreparedBinding(t *testing.T) {
|
||||
if _, err := ws.AckWorkspaceRevoked(ctx, &control.WorkspaceRevocationAck{Identity: id, HeadGen: 9}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got, ok, err := h.Lifecycle().WorkspaceBindings.Get("v"); err != nil || !ok || !got.Retired {
|
||||
if got, ok, err := h.Lifecycle().WorkspaceBindings.Get("v"); err != nil || !ok || len(got) != 1 || !got[0].Retired {
|
||||
t.Fatal("ACK did not retire the old binding", got, err)
|
||||
}
|
||||
if _, err := ws.RegisterWorkspaceBinding(ctx, b); err != nil {
|
||||
@@ -52,7 +52,7 @@ func TestWorkspaceRPCSameHostCleanMoveKeepsRepreparedBinding(t *testing.T) {
|
||||
if line, _ := h.Publisher().VolumeAuthorityLine("v"); line.Epoch != 2 || line.DataAddr != b.DataAddr || line.CtrlAddr != b.CtrlAddr {
|
||||
t.Fatal("same-host move did not publish exactly the next epoch", line)
|
||||
}
|
||||
if got, ok, err := h.Lifecycle().WorkspaceBindings.Get("v"); err != nil || !ok || got.Retired {
|
||||
if got, ok, err := h.Lifecycle().WorkspaceBindings.Get("v"); err != nil || !ok || len(got) != 1 || got[0].Retired {
|
||||
t.Fatal("old epoch retired the re-prepared binding", got, err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user