wardenprotocol: Integration tests are not working

Currently, integration tests are not working. It falling with warden node never became running error.

Command:

cd tests && just test

Logs:

go test -run 'TestIntegration' -v ./integration_test.go
=== RUN   TestIntegration
=== RUN   TestIntegration/CreateSpace
setup test: CreateSpace
    warden_node.go:83: 
                Error Trace:    /Users/igor/work/cosmos/warden/wardenprotocol/tests/framework/exec/warden_node.go:83
                                                        /usr/local/go/src/runtime/asm_arm64.s:1222
                Error:          Received unexpected error:
                                exec: /var/folders/83/_nhy87k943n6968qf_t87lvw0000gn/T/TestIntegration3218378275/001/wardend --log_no_color start --home /var/folders/83/_nhy87k943n6968qf_t87lvw0000gn/T/TestIntegrationCreateSpace2494717894/001 --x-crisis-skip-assert-invariants
                                err: signal: killed
                                stdout: 
                                stderr: 
                Test:           TestIntegration/CreateSpace
    warden_node.go:91: 
                Error Trace:    /Users/igor/work/cosmos/warden/wardenprotocol/tests/framework/exec/warden_node.go:91
                                                        /Users/igor/work/cosmos/warden/wardenprotocol/tests/cases/create_space.go:26
                                                        /Users/igor/work/cosmos/warden/wardenprotocol/tests/integration_test.go:44
                Error:          Condition never satisfied
                Test:           TestIntegration/CreateSpace
                Messages:       warden node never became running
tests duration: 5.004322542s
--- FAIL: TestIntegration (15.37s)
    --- FAIL: TestIntegration/CreateSpace (5.00s)
FAIL
FAIL    command-line-arguments  15.782s
FAIL
error: Recipe `test` failed on line 3 with exit code 1

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

I’m also on Mac and you’re right, that sed command only works if you have GNU sed installed (brew install gnu-sed). Still I don’t understand why the tests are not working 😦

For more information - I’m running it on Mac M1. I noticed that some commands can’t be executed without editing. For example, this line from just localnet falling with error:

sed -i 's/cors_allowed_origins = \[\]/cors_allowed_origins = ["*"]/' ~/.warden/config/config.toml

Error:

sed: 1: "/Users/igor/.warden/con ...": command i expects \ followed by text

And it works only this way:

sed -i'' -e 's/cors_allowed_origins = \[\]/cors_allowed_origins = ["*"]/' ~/.warden/config/config.toml

}, 5time.Second, 5time.Millisecond, “warden node never became running.\nstdout:\n%s\nstderr:\n%s”, w.Stdout.String(), w.Stderr.String())

Messages:       warden node never became running.
                                stdout:
                                
                                stderr:
tests duration: 5.006430208s

I also tried this, but didn’t get any logs:

require.Eventually(t, func() bool {
  stderr := w.Stderr.String()
  stdout := w.Stderr.String()
  if len(stderr) != 0 {
    println("!!! ERR", stderr)
  }
  if len(stdout) != 0 {
    println("!!! LOG", stdout)
  }
  ...
}

stdout := w.Stderr.String()

should be

stdout := w.Stdout.String()