-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration tests are not working #354
Comments
Also, it would be great to write more integration tests that will include all possible user actions. |
it works for me (on current main branch) so it might be a timing issue. The expected output is this
In order to understand if it's really just a matter of timing, could you increase the timeout here:
from 5 seconds to something like 5 minutes? It should be plenty of time to start a wardend node :) |
Same result: % just test
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/TestIntegration1475181834/001/wardend --log_no_color start --home /var/folders/83/_nhy87k943n6968qf_t87lvw0000gn/T/TestIntegrationCreateSpace255166513/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: 5m0.012776042s
--- FAIL: TestIntegration (310.41s)
--- FAIL: TestIntegration/CreateSpace (300.01s)
FAIL
FAIL command-line-arguments 310.878s
FAIL
error: Recipe `test` failed on line 3 with exit code 1 |
can you change that same line to this:
so we can see the logs from the node |
|
ah gotcha, the right syntax for the log message would be something like this
|
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() |
|
Fixed, but got the same result |
so strange, it works for me
|
Do I need to make a snapshot or run a node before starting the test? |
no, i just cloned this repo and only run |
I'm a bit out of ideas, maybe you can try running with a debugger attached? It's so weird that the stdout is not being captured what OS are you using? @optifat can you try to run these and see if they work for you? |
For more information - I'm running it on Mac M1. I noticed that some commands can't be executed without editing. sed -i 's/cors_allowed_origins = \[\]/cors_allowed_origins = ["*"]/' ~/.warden/config/config.toml Error:
And it works only this way: sed -i'' -e 's/cors_allowed_origins = \[\]/cors_allowed_origins = ["*"]/' ~/.warden/config/config.toml |
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 :( |
No, I got
|
I'm going to close this as we couldn't reproduce on several machines. |
Currently, integration tests are not working. It falling with
warden node never became running
error.Command:
Logs:
The text was updated successfully, but these errors were encountered: