diff --git a/go/vt/vtctl/workflow/testlib/fake_tablet.go b/go/cmd/vtctldclient/command/framework_test.go similarity index 97% rename from go/vt/vtctl/workflow/testlib/fake_tablet.go rename to go/cmd/vtctldclient/command/framework_test.go index 4ab5603c807..d2652d85eda 100644 --- a/go/vt/vtctl/workflow/testlib/fake_tablet.go +++ b/go/cmd/vtctldclient/command/framework_test.go @@ -14,11 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -/* -Package testlib contains utility methods to include in unit tests to -deal with topology common tasks, like fake tablets and action loops. -*/ -package testlib +package command import ( "context" @@ -54,7 +50,7 @@ import ( ) func init() { - tabletconntest.SetProtocol("go.vt.vtctl.workflow.testlib", "grpc") + tabletconntest.SetProtocol("go.cmd.vtctldclient.command", "grpc") } // This file contains utility methods for unit tests. diff --git a/go/cmd/vtctldclient/command/permissions_test.go b/go/cmd/vtctldclient/command/permissions_test.go index fc010e9d444..a9ddba36f7f 100644 --- a/go/cmd/vtctldclient/command/permissions_test.go +++ b/go/cmd/vtctldclient/command/permissions_test.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Vitess Authors. +Copyright 2025 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import ( "vitess.io/vitess/go/vt/discovery" "vitess.io/vitess/go/vt/topo/topoproto" "vitess.io/vitess/go/vt/vtctl/grpcvtctldserver" - "vitess.io/vitess/go/vt/vtctl/workflow/testlib" "vitess.io/vitess/go/vt/vtenv" "vitess.io/vitess/go/sqltypes" @@ -52,8 +51,8 @@ func TestPermissions(t *testing.T) { defer ts.Close() vtctld := grpcvtctldserver.NewVtctldServer(vtenv.NewTestEnv(), ts) - primary := testlib.NewFakeTablet(t, ts, "cell1", 0, topodatapb.TabletType_PRIMARY, nil) - replica := testlib.NewFakeTablet(t, ts, "cell1", 1, topodatapb.TabletType_REPLICA, nil) + primary := NewFakeTablet(t, ts, "cell1", 0, topodatapb.TabletType_PRIMARY, nil) + replica := NewFakeTablet(t, ts, "cell1", 1, topodatapb.TabletType_REPLICA, nil) // Mark the primary for the shard. _, err := ts.UpdateShardFields(ctx, primary.Tablet.Keyspace, primary.Tablet.Shard, func(si *topo.ShardInfo) error {