Skip to content

Commit

Permalink
refactor: remove playground
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 committed Jan 16, 2024
1 parent 7df5cf5 commit c68b294
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 65 deletions.
1 change: 0 additions & 1 deletion pkg/components/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,5 @@ func generateAddrArg(addr string, nodeId int) string {
host, port, _ := net.SplitHostPort(addr)
portInt, _ := strconv.Atoi(port)

fmt.Println("======mklmkl", host, port, nodeId, portInt+nodeId, net.JoinHostPort(host, strconv.Itoa(portInt+nodeId)))
return net.JoinHostPort(host, strconv.Itoa(portInt+nodeId))
}
20 changes: 20 additions & 0 deletions tests/e2e/greptimedbcluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,26 @@ var _ = Describe("Basic test of greptimedb cluster", func() {
})
})

var _ = Describe("Basic test of greptimedb playground", func() {
It("Run Playground", func() {
var err error
go func() {
err = playground()
}()
Expect(err).NotTo(HaveOccurred(), "failed to create playground")
})
})

func playground() error {
cmd := exec.Command("../../bin/gtctl", "playground")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
return err
}
return nil
}

func createCluster() error {
cmd := exec.Command("../../bin/gtctl", "cluster", "create", "mydb", "--timeout", "300")
cmd.Stdout = os.Stdout
Expand Down
43 changes: 0 additions & 43 deletions tests/e2e/greptimedbplayground_test.go

This file was deleted.

21 changes: 0 additions & 21 deletions tests/e2e/testdata/cluster.yaml

This file was deleted.

0 comments on commit c68b294

Please sign in to comment.