Testing and Building with DUNE
DUNE makes it easier to test locally. Performing integration tests with DUNE requires some setup. DUNE may be installed from git hub
Open Local Node Port
Need to change scripts/config.ini from
http-server-address = 127.0.0.1:8888 to
http-server-address = 0.0.0.0:8888. This will enable port 8888 to listen on all ports, and that is needed because docker runs on a different network.
This is part of the docker image, so this must be completed before running
bootstrap. If you already have a docker image you can
- Destroy the docker container
- Remove docker image
- Re-run bootstrap
An alternative option is to enter the docker container, change the configuration, and restart the node.
Once you follow the directions you need to grap the keys for the existing eosio account.
egrep 'priv_key|pub_key' src/dune/*.py
Start a Node
Start a node if you haven't already
dune --start test_node
Start a Docker shell. Must be done locally due to permission problems with DUNE.
docker exec -it dune_container /bin/bash
Commands to make wallet
cleos wallet create -n bob -f jungle4-wallet/bob.wallet
cleos wallet unlock -n bobtestlion1 --password $(cat jungle4-wallet/bob.wallet)
Now we can create our test accounts. In the examples below replace, priv_key and pub_key with the values from [DUNE Keys](#DUNE Keys)
dune --create-account bob eosio pub_key priv_key
dune --create-account alice eosio pub_key priv_key
Add Private Key to Wallet
Use bob's priv_key Note done locally
cleos wallet import -n bobtestlion1 --private-key priv_key
Note done locally
cleos transfer bob alice "0.001 EOS" "Hodl!" -p bob
Private Keys in Tests
src/tests/web.html to make sure the private key matches DUNE's.
npm run test node
If you want just the integration tests run.
npm run test-node