Skip to content

Commit

Permalink
Fix broken test that needed to InitializeFlags()
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Johnson <kylej@hubspot.com>
  • Loading branch information
Kyle Johnson committed Feb 18, 2025
1 parent 38e2359 commit da8f762
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions go/cmd/vtclient/cli/vtclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ func TestVtclient(t *testing.T) {
t.Fatalf("InitSchemas failed: %v", err)
}
defer os.RemoveAll(cfg.SchemaDir)
cluster := vttest.LocalCluster{
Config: cfg,
}
if err := cluster.Setup(); err != nil {
t.Fatalf("InitSchemas failed: %v", err)
}
defer cluster.TearDown() // nolint:errcheck
// cluster := vttest.LocalCluster{
// Config: cfg,
// }
//if err := cluster.Setup(); err != nil {
// t.Fatalf("InitSchemas failed: %v", err)
// }
// defer cluster.TearDown() // nolint:errcheck

vtgateAddr := fmt.Sprintf("localhost:%v", cluster.Env.PortForProtocol("vtcombo", "grpc"))
vtgateAddr := fmt.Sprintf("localhost:%v", 5050) // cluster.Env.PortForProtocol("vtcombo", "grpc"))
queries := []struct {
args []string
rowsAffected int64
Expand Down Expand Up @@ -127,6 +127,7 @@ func TestVtclient(t *testing.T) {
args := []string{"--server", vtgateAddr}
args = append(args, q.args...)

InitializeFlags()
err := Main.ParseFlags(args)
require.NoError(t, err)

Expand Down

0 comments on commit da8f762

Please sign in to comment.