github.com/MetalBlockchain/subnet-evm@v0.6.3/tests/README.md (about)

     1  # Developing with tmpnet
     2  
     3  The `load/` and `warp/` paths contain end-to-end (e2e) tests that use
     4  the [tmpnet
     5  fixture](https://github.com/ava-labs/avalanchego/blob/master/tests/fixture/tmpnet/README.md). By
     6  default both test suites use the tmpnet fixture to create a temporary
     7  network that exists for only the duration of their execution.
     8  
     9  It is possible to create a temporary network that can be reused across
    10  test runs to minimize the setup cost involved:
    11  
    12  ```bash
    13  # From the root of a clone of avalanchego, build the tmpnetctl cli
    14  $ ./scripts/build_tmpnetctl.sh
    15  
    16  # Start a new temporary network configured with subnet-evm's default plugin path
    17  $ ./build/tmpnetctl start-network \
    18    --avalanche-path=./build/avalanchego
    19    --plugin-dir=$GOPATH/src/github.com/ava-labs/avalanchego/build/plugins
    20  
    21  # From the root of a clone of subnet-evm, execute the warp test suite against the existing network
    22  $ ginkgo -vv ./tests/warp -- --use-existing-network --network-dir=$HOME/.tmpnet/networks/latest
    23  
    24  # To stop the temporary network when no longer needed, execute the following from the root of the clone of avalanchego
    25  $ ./build/tmpnetctl stop-network --network-dir=$HOME/.tmpnet/networks/latest
    26  ```
    27  
    28  The network started by `tmpnetctl` won't come with subnets configured,
    29  so the test suite will add them to the network the first time it
    30  runs. Subsequent test runs will be able to reuse those subnets without
    31  having to set them up.