-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update readme for e2e-tests (#799)
* 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
Showing
1 changed file
with
9 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. |