diff --git a/seaweed-block/core/host/master/workspace_same_host_clean_test.go b/seaweed-block/core/host/master/workspace_same_host_clean_test.go index e518160a4c..6134a2c3d9 100644 --- a/seaweed-block/core/host/master/workspace_same_host_clean_test.go +++ b/seaweed-block/core/host/master/workspace_same_host_clean_test.go @@ -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 {