|
5 | 5 | 3) [Zcashd, Zcash-Cli](https://github.com/zcash/zcash)
|
6 | 6 |
|
7 | 7 | ### Tests
|
8 |
| -1) Simlink or copy compiled `zebrad`, zcashd` and `zcash-cli` binaries to `$ zaino/test_binaries/bins/*` |
| 8 | +1) Symlink or copy compiled `zebrad`, `zcashd` and `zcash-cli` binaries to `zaino/test_binaries/bins/*` |
| 9 | + |
| 10 | +**Chain Cache** _Several tests rely on a cached chain to run, for these tests to pass the chain must first be generated:_ |
9 | 11 |
|
10 |
| -Chain Cache: Several tests rely on a cached chain to run, for these tests to pass the chain must first be generated: |
11 | 12 | 2) Generate the zcashd chain cache `cargo nextest run generate_zcashd_chain_cache --run-ignored ignored-only`
|
12 | 13 | 3) Generate the zebrad chain cache `cargo nextest run generate_zebrad_large_chain_cache --run-ignored ignored-only`
|
13 | 14 |
|
14 |
| -Client Rpc Tests: For the client rpc tests to pass a Zaino release binary must be built and added to PATH: |
15 |
| -4) Build release binary `cargo build --release` and add to PATH. WARNING: these tests do not use the binary built by cargo nextest |
| 15 | +**Client Rpc Tests** _For the client rpc tests to pass a Zaino release binary must be built and added to PATH. |
| 16 | +WARNING: these tests do not use the binary built by cargo nextest._ |
| 17 | + |
| 18 | +4) Build release binary `cargo build --release` and add to PATH. For example, `export PATH=./target/release:$PATH` |
16 | 19 |
|
17 |
| -5) Run `$ cargo nextest run` |
| 20 | +5) Run `cargo nextest run` |
18 | 21 |
|
19 | 22 | NOTE: The client rpc get_subtree_roots tests are currently ignored, to run them testnet and mainnet chains must first be generated.
|
20 |
| -- To run client rpc test `get_subtree_roots_sapling`: |
| 23 | + |
| 24 | +To run client rpc test `get_subtree_roots_sapling`: |
21 | 25 | 1) sync Zebrad testnet to at least 2 sapling shards
|
22 | 26 | 2) copy the Zebrad testnet `state` cache to `zaino/integration-tests/chain_cache/get_subtree_roots_sapling` directory.
|
| 27 | + |
23 | 28 | See the `get_subtree_roots_sapling` test fixture doc comments in infrastructure for more details.
|
24 | 29 |
|
25 |
| -- To run client rpc test `get_subtree_roots_orchard`: |
| 30 | +To run client rpc test `get_subtree_roots_orchard`: |
26 | 31 | 1) sync Zebrad mainnet to at least 2 orchard shards
|
27 | 32 | 2) copy the Zebrad mainnet `state` cache to `zaino/integration-tests/chain_cache/get_subtree_roots_orchard` directory.
|
| 33 | + |
28 | 34 | See the `get_subtree_roots_orchard` test fixture doc comments in infrastructure for more details.
|
29 | 35 |
|
30 | 36 | - TESTNET TESTS:
|
31 |
| -the testnet tests are temporary and will be replaced with regtest as soon as (https://github.com/zingolabs/zaino/issues/231) is resolved |
32 |
| -In the mean time, these tests can be ran, but it is a fiddly process. First, it needs a zebrad fully synced to testnet (depending |
33 |
| -on internet speed, etc., this could take 10+ hours). Then, the tests must be run 1 at a time (passing `--no-capture` will enforce this). |
34 |
| -Furthermore, due to https://github.com/zingolabs/infrastructure/issues/43, sometimes a zebrad will persist past the end of the test and |
35 |
| -hold a lock on the testnet cache, causing all remaining tests to fail. This process must be stopped manually, in order to allow testnet |
36 |
| -tests to work again. |
| 37 | +The testnet tests are temporary and will be replaced with regtest as soon as (https://github.com/zingolabs/zaino/issues/231) is resolved. |
| 38 | +In the mean time, these tests can be ran, but it is a fiddly process. First, it needs a zebrad fully synced to testnet (depending on internet speed, etc., this could take 10+ hours). |
| 39 | +To build the zebra testnet cache, the best way is to use zebra directly. With `zebrad` already in `$PATH` and from the `zaino/` directory run `zebrad --config ./zainod/zebrad.toml start`. |
| 40 | +Then, the tests must be run 1 at a time (passing `--no-capture` will enforce this). |
| 41 | +Furthermore, due to https://github.com/zingolabs/infrastructure/issues/43, sometimes a zebrad may persist past the end of the test and hold a lock on the testnet cache, causing remaining tests to fail. This process can be stopped manually, in order to allow testnet tests to work again. |
0 commit comments