Skip to content

Commit 9a2c531

Browse files
author
Roman
committed
update README.md
1 parent 0ac6ffc commit 9a2c531

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,49 @@ The Python interpreter output will look like below.
221221
>>>
222222
```
223223

224+
### Testing
225+
You can run integration and unit tests in interactive mode of IDE or in terminal mode using the command:
226+
```bash
227+
pytest tests/integration_tests
228+
pytest tests/unit_tests
229+
```
230+
231+
#### E2E tests have 2 options for launching (legacy runner):
232+
- using a compiler based on the substrait code
233+
- using an already built docker image (docker runner)
234+
235+
#### Using `docker runner` (default for now):
236+
- E2E tests with docker image do not require preliminary compilation
237+
- are executed very quickly
238+
- require docker installed in OS
239+
240+
Ho to use:
241+
```bash
242+
pytest tests/e2e_tests
243+
```
244+
245+
#### TUsing `legacy runner`:
246+
- Will start compilation of the collected code in your subtensor repository
247+
- you must provide the `LOCALNET_SH_PATH` variable in the local environment with the path to the file `/scripts/localnet.sh` in the cloned repository within your OS
248+
- you can use the `BUILD_BINARY=0` variable, this will skip the copy step for each test.
249+
- you can use the `USE_DOCKER=0` variable, this will run tests using the "legacy runner", even if docker is installed in your OS
250+
251+
#### Ho to use:
252+
Regular e2e tests run
253+
```bash
254+
LOCALNET_SH_PATH=/path/to/your/localnet.sh pytest tests/e2e_tests
255+
```
256+
257+
If you want to skip re-build process for each e2e test
258+
```bash
259+
BUILD_BINARY=0 LOCALNET_SH_PATH=/path/to/your/localnet.sh pytest tests/e2e_tests
260+
```
261+
262+
If you want to use legacy runner even with installed Docker in your OS
263+
```bash
264+
USE_DOCKER=0 BUILD_BINARY=0 LOCALNET_SH_PATH=/path/to/your/localnet.sh pytest tests/e2e_tests
265+
```
266+
224267
---
225268

226269
## Release Guidelines

0 commit comments

Comments
 (0)