Skip to content
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

docs: update readme for e2e-tests #799

Merged
merged 2 commits into from
Jan 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions e2e-tests/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
## Summary

This is a helper library for Sidecar to run runtime tests against specific chains, at certain blocks.
This is a helper library for Sidecar to run e2e tests against specific chains, at certain blocks.

## Testing

The below instructions are specific to runtime-tests against one chain.
If you are looking to run the runtime-tests against all 3 chains (Polkadot, Kusama, Westend) then run `yarn test:init-runtime-tests` in
The below instructions are specific to running the e2e-tests against one chain.
If you are looking to run the e2e-tests against all chains (Polkadot, Kusama, Westend, Statemine) then run `yarn test:init-e2e-tests` in
the root directory of sidecar.

### Polkadot

Lets first get sidecar ready in a seperate terminal.
To run the tests against a single chain, you may use the following below. For more examples, reference the `<ROOT>/package.json`

```
$ cd substrate-api-sidecar
$ git checkout <your_branch>
$ export SAS_SUBSTRATE_WS_URL=<network archive node>
TarikGul marked this conversation as resolved.
Show resolved Hide resolved
$ yarn
$ yarn build && yarn start
```
`yarn test:init-e2e-tests:polkadot`

Sidecar should now be connected to the node and running successfully. If you find a bug file an issue [here](https://github.com/paritytech/substrate-api-sidecar/issues).
That's it!
All the tests should come back with green checkmarks. If you find a bug file an issue [here](https://github.com/paritytech/substrate-api-sidecar/issues).

Now lets run our runtime tests against polkadot. Go to a separate terminal and run:
### Config

`yarn test:runtime-tests --chain polkadot`

Thats it!
All the tests should come back with green checkmarks.
If you are looking to update the e2e-tests config, the file to do so exists in `<ROOT>/scripts/config.ts`.