Skip to content

Commit f0d6c1e

Browse files
committed
Reorgnaize the permissions tests
Signed-off-by: Matt Lord <mattalord@gmail.com>
1 parent 60fca3a commit f0d6c1e

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

go/vt/vtctl/workflow/testlib/fake_tablet.go renamed to go/cmd/vtctldclient/command/framework_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
/*
18-
Package testlib contains utility methods to include in unit tests to
19-
deal with topology common tasks, like fake tablets and action loops.
20-
*/
21-
package testlib
17+
package command
2218

2319
import (
2420
"context"
@@ -54,7 +50,7 @@ import (
5450
)
5551

5652
func init() {
57-
tabletconntest.SetProtocol("go.vt.vtctl.workflow.testlib", "grpc")
53+
tabletconntest.SetProtocol("go.cmd.vtctldclient.command", "grpc")
5854
}
5955

6056
// This file contains utility methods for unit tests.

go/cmd/vtctldclient/command/permissions_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Vitess Authors.
2+
Copyright 2025 The Vitess Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@ import (
2626
"vitess.io/vitess/go/vt/discovery"
2727
"vitess.io/vitess/go/vt/topo/topoproto"
2828
"vitess.io/vitess/go/vt/vtctl/grpcvtctldserver"
29-
"vitess.io/vitess/go/vt/vtctl/workflow/testlib"
3029
"vitess.io/vitess/go/vt/vtenv"
3130

3231
"vitess.io/vitess/go/sqltypes"
@@ -52,8 +51,8 @@ func TestPermissions(t *testing.T) {
5251
defer ts.Close()
5352
vtctld := grpcvtctldserver.NewVtctldServer(vtenv.NewTestEnv(), ts)
5453

55-
primary := testlib.NewFakeTablet(t, ts, "cell1", 0, topodatapb.TabletType_PRIMARY, nil)
56-
replica := testlib.NewFakeTablet(t, ts, "cell1", 1, topodatapb.TabletType_REPLICA, nil)
54+
primary := NewFakeTablet(t, ts, "cell1", 0, topodatapb.TabletType_PRIMARY, nil)
55+
replica := NewFakeTablet(t, ts, "cell1", 1, topodatapb.TabletType_REPLICA, nil)
5756

5857
// Mark the primary for the shard.
5958
_, err := ts.UpdateShardFields(ctx, primary.Tablet.Keyspace, primary.Tablet.Shard, func(si *topo.ShardInfo) error {

0 commit comments

Comments
 (0)