mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
test: clone protobuf requests without copying lock state
This commit is contained in:
1 parent
e6fcfd38b9
commit
a489f4e1f5
1 file changed
+3
-2
@@ -4,6 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
control "github.com/seaweedfs/seaweed-block/core/rpc/control"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// INV-WS-SAME-HOST-CLEAN-MOVE-001: retirement belongs to an epoch, so the
|
||||
@@ -46,9 +47,9 @@ func TestWorkspaceRPCSameHostCleanMoveKeepsRepreparedBinding(t *testing.T) {
|
||||
if _, err := ws.RegisterWorkspaceBinding(ctx, b); err != nil {
|
||||
t.Fatal("same-host re-prepare refused", err)
|
||||
}
|
||||
forced := *req
|
||||
forced := proto.Clone(req).(*control.WorkspaceMove)
|
||||
forced.Kind, forced.Force = "forced", true
|
||||
if _, err := ws.MoveWorkspace(ctx, &forced); err == nil {
|
||||
if _, err := ws.MoveWorkspace(ctx, forced); err == nil {
|
||||
t.Fatal("same-host forced move accepted over RPC")
|
||||
}
|
||||
if _, err := ws.MoveWorkspace(ctx, req); err != nil {
|
||||
|
||||
Reference in new issue
Block a user