Skip to content

Commit

Permalink
test ginkgo tests logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Lam committed Aug 31, 2023
1 parent 9ae7286 commit e34680d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ source "$AWM_RELAYER_PATH"/scripts/constants.sh

source "$AWM_RELAYER_PATH"/scripts/versions.sh

RUN_E2E=true

# Build ginkgo
# to install the ginkgo binary (required for test build and run)
go install -v github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}

ginkgo build ./tests/e2e
ACK_GINKGO_RC=true ginkgo build ./tests/e2e

# Run the tests
./tests/e2e/e2e.test \
Expand Down
10 changes: 10 additions & 0 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ var _ = ginkgo.BeforeSuite(func() {
fmt.Println(string(out))
gomega.Expect(err).Should(gomega.BeNil())

cmd = exec.Command(fmt.Sprintf("echo %s", "hello world"))
out, err = cmd.CombinedOutput()
fmt.Println(string(out))
gomega.Expect(err).Should(gomega.BeNil())
log.Info("Tested hello world")

// Name 10 new validators (which should have BLS key registered)
subnetANodeNames := make([]string, 0)
subnetBNodeNames := []string{}
Expand Down Expand Up @@ -247,6 +253,10 @@ var _ = ginkgo.Describe("[Relay]", ginkgo.Ordered, func() {

log.Info("Created awm-relayer config", "configPath", relayerConfigPath, "config", string(data))
})

ginkgo.It("Should fail", ginkgo.Label("Relayer", "Fail"), func() {
gomega.Expect(false).Should(gomega.BeTrue())
})
})

func getURIHostAndPort(uri string) (string, uint32, error) {
Expand Down

0 comments on commit e34680d

Please sign in to comment.