Skip to content

Commit

Permalink
test: update test cases with validation for block producing
Browse files Browse the repository at this point in the history
  • Loading branch information
hemz10 committed Apr 26, 2024
1 parent c1e9975 commit d4ca52f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/functional/dive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,13 @@ var _ = ginkgo.Describe("DIVE CLI App", func() {
defer dive.Clean(enclaveName)
err := cmd.Run()
gomega.Expect(err).NotTo(gomega.HaveOccurred())
service_path, _ := filepath.Glob(fmt.Sprintf("output/%s/services_%s_*.json", enclaveName, enclaveName))
endpoint := dive.GetServiceDetailsCosmos(service_path[0], dive.DEFAULT_ARCHWAY_SERVICENAME)

// Get latest block and check if node is producing blocks
height, err := dive.GetCosmosLatestBlock(endpoint)
gomega.Expect(err).NotTo(gomega.HaveOccurred())
gomega.Expect(height).Should(gomega.BeNumerically(">", 0))
})

ginkgo.It("should run single custom archway node-1", func() {
Expand All @@ -714,6 +721,13 @@ var _ = ginkgo.Describe("DIVE CLI App", func() {
defer dive.Clean(enclaveName)
err := cmd.Run()
gomega.Expect(err).NotTo(gomega.HaveOccurred())
service_path, _ := filepath.Glob(fmt.Sprintf("output/%s/services_%s_*.json", enclaveName, enclaveName))
endpoint := dive.GetServiceDetailsCosmos(service_path[0], dive.ARCHWAY_CONFIG0_SERVICENAME)

// Get latest block and check if node is producing blocks
height, err := dive.GetCosmosLatestBlock(endpoint)
gomega.Expect(err).NotTo(gomega.HaveOccurred())
gomega.Expect(height).Should(gomega.BeNumerically(">", 0))
})

ginkgo.It("should run single custom archway node with invalid json path", func() {
Expand Down

0 comments on commit d4ca52f

Please sign in to comment.