Skip to content

Commit

Permalink
Correct WriteTopologyPath args to match help text (#17735)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord authored Feb 11, 2025
1 parent 404a55a commit 2b21fb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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 {
file := cmd.Flags().Arg(0)
path := cmd.Flags().Arg(1)
path := cmd.Flags().Arg(0)
file := 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
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("--server", "internal", "WriteTopologyPath", topoCustomRuleFile, topoCustomRulePath)
err = clusterInstance.VtctldClientProcess.ExecuteCommand("--server", "internal", "WriteTopologyPath", topoCustomRulePath, topoCustomRuleFile)
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("--server", "internal", "WriteTopologyPath", topoCustomRuleFile, topoCustomRulePath)
err = clusterInstance.VtctldClientProcess.ExecuteCommand("--server", "internal", "WriteTopologyPath", topoCustomRulePath, topoCustomRuleFile)
require.Nil(t, err, "error should be Nil")

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

0 comments on commit 2b21fb4

Please sign in to comment.