-
Notifications
You must be signed in to change notification settings - Fork 11
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
test: e2e testing #96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a more in-depth look at the tests themselves tomorrow morning:
But make side:
Could we prevent these tests from running under the make-unit-cover
command? Since these aren't unit tests. Ideally, they would have a separate command make-e2e-test
and make-e2e-cover
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More comments now that I'm not tired, haha.
s.runValidators(s.chain, 0) | ||
} | ||
|
||
func (s *IntegrationTestSuite) TearDownSuite() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC golang calls this automatically? So the temp files should always get removed even if an error happens right? If not maybe we should consider making these temp files in the /tmp
dir instead of locally was what I think I saw.
Motivation
End-to-end testing is an addition to the current seda-chain testing framework that relies only on unit tests.
Explanation of Changes
The e2e testing runs two chain Docker containers to deploy a local chain. It then sends transactions through Docker command lines and tests the outcomes using HTTP API queries. Once testing is finished, the containers are torn down.
The current implementation tests the three transaction commands in our wasm-storage module:
To run the e2e tests, first build the Docker image using a Makefile command:
You can then run the e2e test with the following command:
Note that to run these tests through VS Code, you may have to adjust the timeout period. The tests take about a minute or two to run.
Related PRs and Issues
Closes #94