Skip to content

Commit

Permalink
Fix tabletmanager tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Jan 2, 2025
1 parent 49e70b1 commit 6e4a4b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions go/cmd/vtctldclient/command/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ var writeTopologyPathOptions = struct {
}{}

func commandWriteTopologyPath(cmd *cobra.Command, args []string) error {
path := cmd.Flags().Arg(0)
file := cmd.Flags().Arg(1)
file := cmd.Flags().Arg(0)
path := cmd.Flags().Arg(1)
ts, err := topo.OpenServer(topoOptions.implementation, strings.Join(topoOptions.globalServerAddresses, ","), topoOptions.globalRoot)
if err != nil {
return fmt.Errorf("failed to connect to the topology server: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/cluster/vtctldclient_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (vtctldclient *VtctldClientProcess) ExecuteCommandWithOutput(args ...string
}
if !slices.Contains(args, "--server") {
// Only add the default server if one was not already specified.
args = append(args, "--server", vtctldclient.Server)
pArgs = append(pArgs, "--server", vtctldclient.Server)
}
if *isCoverage {
pArgs = append(pArgs, "--test.coverprofile="+getCoveragePath("vtctldclient-"+args[0]+".out"), "--test.v")
Expand Down
4 changes: 2 additions & 2 deletions go/test/endtoend/tabletmanager/custom_rule_topo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestTopoCustomRule(t *testing.T) {
require.NoError(t, err)

// Copy config file into topo.
err = clusterInstance.VtctldClientProcess.ExecuteCommand("WriteTopologyPath", topoCustomRuleFile, topoCustomRulePath)
err = clusterInstance.VtctldClientProcess.ExecuteCommand("--server", "internal", "WriteTopologyPath", topoCustomRuleFile, topoCustomRulePath)
require.Nil(t, err, "error should be Nil")

// Set extra tablet args for topo custom rule
Expand Down Expand Up @@ -100,7 +100,7 @@ func TestTopoCustomRule(t *testing.T) {
err = os.WriteFile(topoCustomRuleFile, data, 0777)
require.NoError(t, err)

err = clusterInstance.VtctldClientProcess.ExecuteCommand("WriteTopologyPath", topoCustomRuleFile, topoCustomRulePath)
err = clusterInstance.VtctldClientProcess.ExecuteCommand("--server", "internal", "WriteTopologyPath", topoCustomRuleFile, topoCustomRulePath)
require.Nil(t, err, "error should be Nil")

// And wait until the query fails with the right error.
Expand Down

0 comments on commit 6e4a4b0

Please sign in to comment.