|
1 | 1 | # Avalanche e2e test suites |
2 | 2 |
|
3 | | -- Works with fixture-managed networks. |
| 3 | +- Works with fixture-managed ephemeral networks. |
4 | 4 | - Compiles to a single binary with customizable configurations. |
5 | 5 |
|
6 | 6 | ## Running tests |
@@ -57,44 +57,46 @@ packages. `x/transfer/virtuous.go` defines X-Chain transfer tests, |
57 | 57 | labeled with `x`, which can be selected by `./tests/e2e/e2e.test |
58 | 58 | --ginkgo.label-filter "x"`. |
59 | 59 |
|
60 | | -## Testing against a persistent network |
| 60 | +## Testing against an existing network |
61 | 61 |
|
62 | 62 | By default, a new ephemeral test network will be started before each |
63 | | -test run. When developing e2e tests, it may be helpful to create a |
64 | | -persistent test network to test against. This can increase the speed |
65 | | -of iteration by removing the requirement to start a new network for |
66 | | -every invocation of the test under development. |
| 63 | +test run and stopped at the end of the run. When developing e2e tests, |
| 64 | +it may be helpful to create an ephemeral network that can be used |
| 65 | +across multiple test runs. This can increase the speed of iteration by |
| 66 | +removing the requirement to start a new network for every invocation |
| 67 | +of the test under development. |
67 | 68 |
|
68 | | -To use a persistent network: |
| 69 | +To create an ephemeral network for use across test runs: |
69 | 70 |
|
70 | 71 | ```bash |
71 | 72 | # From the root of the avalanchego repo |
72 | 73 |
|
73 | | -# Build the testnetctl binary |
74 | | -$ ./scripts/build_testnetctl.sh |
| 74 | +# Build the ephnetctl binary |
| 75 | +$ ./scripts/build_ephnetctl.sh |
75 | 76 |
|
76 | 77 | # Start a new network |
77 | | -$ ./build/testnetctl start-network --avalanchego-path=/path/to/avalanchego |
| 78 | +$ ./build/ephnetctl start-network --avalanchego-path=/path/to/avalanchego |
78 | 79 | ... |
79 | | -Started network 1000 @ /home/me/.testnetctl/networks/1000 |
| 80 | +Started network 1000 @ /home/me/.ephnet/networks/1000 |
80 | 81 |
|
81 | | -Configure testnetctl to target this network by default with one of the following statements: |
82 | | - - source /home/me/.testnetctl/networks/1000/network.env |
83 | | - - export TESTNETCTL_NETWORK_DIR=/home/me/.testnetctl/networks/1000 |
84 | | - - export TESTNETCTL_NETWORK_DIR=/home/me/.testnetctl/networks/latest |
| 82 | +Configure ephnetctl and the test suite to target this network by default |
| 83 | +with one of the following statements: |
| 84 | + - source /home/me/.ephnet/networks/1000/network.env |
| 85 | + - export EPHNET_NETWORK_DIR=/home/me/.ephnet/networks/1000 |
| 86 | + - export EPHNET_NETWORK_DIR=/home/me/.ephnet/networks/latest |
85 | 87 |
|
86 | | -# Start a new test run using the persistent network |
| 88 | +# Start a new test run using the existing network |
87 | 89 | ginkgo -v ./tests/e2e -- \ |
88 | 90 | --avalanchego-path=/path/to/avalanchego \ |
89 | 91 | --ginkgo.focus-file=[name of file containing test] \ |
90 | | - --use-persistent-network \ |
| 92 | + --use-existing-network \ |
91 | 93 | --network-dir=/path/to/network |
92 | 94 |
|
93 | 95 | # It is also possible to set the AVALANCHEGO_PATH env var instead of supplying --avalanchego-path |
94 | | -# and to set TESTNETCTL_NETWORK_DIR instead of supplying --network-dir. |
| 96 | +# and to set EPHNET_NETWORK_DIR instead of supplying --network-dir. |
95 | 97 | ``` |
96 | 98 |
|
97 | | -See the testnet fixture [README](../fixture/testnet/README.md) for more details. |
| 99 | +See the ephnet fixture [README](../fixture/ephnet/README.md) for more details. |
98 | 100 |
|
99 | 101 | ## Skipping bootstrap checks |
100 | 102 |
|
|
0 commit comments