Skip to content

Commit

Permalink
fix11
Browse files Browse the repository at this point in the history
  • Loading branch information
庄润梓 committed Jun 24, 2024
1 parent fdf91cf commit 7e9282d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/e2e/greptimedbcluster_baremetal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var _ = Describe("Basic test of greptimedb cluster in baremetal", func() {
err = getClusterinBaremetal()
Expect(err).NotTo(HaveOccurred(), "failed to get cluster in baremetal")

if cmd.Process != nil {
if cmd != nil && cmd.Process != nil {
err = cmd.Process.Kill()
Expect(err).NotTo(HaveOccurred(), "failed to kill create cluster process")
} else {
Expand All @@ -58,14 +58,14 @@ var _ = Describe("Basic test of greptimedb cluster in baremetal", func() {
})
})

func newCreateClusterinBaremetalCommand() exec.Cmd {
func newCreateClusterinBaremetalCommand() *exec.Cmd {
cmd := exec.Command("../../bin/gtctl", "cluster", "create", "mydb", "--bare-metal")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return *cmd
return cmd
}

func createClusterinBaremetal(cmd exec.Cmd) error {
func createClusterinBaremetal(cmd *exec.Cmd) error {
if err := cmd.Run(); err != nil {
return err
}
Expand Down

0 comments on commit 7e9282d

Please sign in to comment.