diff --git a/test/e2e_cli/connect/connect.go b/test/e2e_cli/connect/connect.go index b9e6860399..f086c3d64c 100644 --- a/test/e2e_cli/connect/connect.go +++ b/test/e2e_cli/connect/connect.go @@ -28,7 +28,10 @@ var _ = ginkgo.Describe("Connect to vCluster", func() { framework.ExpectNoError(err) connectCmd := cmd.NewConnectCmd(&flags.GlobalFlags{}) - connectCmd.Flags().Set("kube-config", kcfgFile.Name()) + + err = connectCmd.Flags().Set("kube-config", kcfgFile.Name()) + framework.ExpectNoError(err) + connectCmd.SetArgs([]string{f.VclusterName}) err = connectCmd.Execute()