Skip to content

Commit

Permalink
docs: update readme for e2e-tests (#799)
Browse files Browse the repository at this point in the history
* docs: update readme for e2e-tests

* Update e2e-tests/README.md

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
  • Loading branch information
TarikGul and niklasad1 committed Jan 4, 2022
1 parent 0b7ef02 commit 583365a
Showing 1 changed file with 9 additions and 17 deletions.
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>
$ 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`.

0 comments on commit 583365a

Please sign in to comment.