Skip to content

Commit

Permalink
Fix other unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Apr 21, 2024
1 parent 407c841 commit e9521bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go/vt/topo/keyspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (ts *Server) FindAllShardsInKeyspace(ctx context.Context, keyspace string,
// characters such as a dash.
keyspace, err := sqlescape.UnescapeID(keyspace)
if err != nil {
return nil, vterrors.Wrapf(err, "FindAllShardsInKeyspace(%s) invalid keyspace name: %v", keyspace, err)
return nil, vterrors.Wrapf(err, "FindAllShardsInKeyspace(%s) invalid keyspace name", keyspace)
}

// First try to get all shards using List if we can.
Expand Down
2 changes: 1 addition & 1 deletion go/vt/topo/keyspace_external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestServerFindAllShardsInKeyspace(t *testing.T) {
opt: &topo.FindAllShardsInKeyspaceOptions{Concurrency: 8},
},
{
name: "backtick'd keyspace",
name: "SQL escaped keyspace",
shards: 32,
keyspace: "`my-keyspace`",
opt: &topo.FindAllShardsInKeyspaceOptions{Concurrency: 8},
Expand Down
7 changes: 4 additions & 3 deletions go/vt/vtctl/workflow/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ func TestVDiffCreate(t *testing.T) {
wantErr string
}{
{
name: "no values",
req: &vtctldatapb.VDiffCreateRequest{},
wantErr: "FindAllShardsInKeyspace(): List: node doesn't exist: keyspaces/shards", // We did not provide any keyspace or shard
name: "no values",
req: &vtctldatapb.VDiffCreateRequest{},
// We did not provide any keyspace or shard.
wantErr: "FindAllShardsInKeyspace() invalid keyspace name: UnescapeID err: invalid input identifier ''",
},
}
for _, tt := range tests {
Expand Down

0 comments on commit e9521bc

Please sign in to comment.