Skip to content

Commit

Permalink
test: updated test scripts to validate blocks in neutron chain (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
Indu-CR authored May 6, 2024
1 parent c564936 commit f515bce
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 @@ -755,6 +755,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_NEUTRON_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 neutron node-1", func() {
Expand All @@ -763,6 +770,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.NEUTRON_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 neutron node with invalid json path", func() {
Expand Down

0 comments on commit f515bce

Please sign in to comment.