poanetwork / poa-test-setup

Deployment of POA network in one click and e2e tests of Ceremony/Governance DApps
GNU General Public License v3.0
9 stars 22 forks source link

POA Network test setup

How it works:

Requirements

  1. Linux, Mac OS
  2. NodeJS@10
  3. Parity 2.6.5+
  4. Google Chrome

Basic scenarios

There are some options to start POA Network test setup depending on your needs:

Start MoC node

  1. npm i
  2. npm run start-moc-setup

At the successful end of POA test setup start you'll see this message: ### POA test setup is configured ###

Expected results:

Launch DApps

Note: can be started after the previous step is completed

npm run launch-dapps

For Ubuntu users: if you encounter any errors during DApps launching, try to increase max_user_watches limit and repeat steps:

$ npm run stop-test-setup
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -p
$ npm run start-moc-setup
$ npm run launch-dapps

Expected results:

Check Emission Funds balance

Note: can be started after the previous step is completed

npm run check-emission-funds-balance

Expected results:

Launch Ceremony

Note: can be started after the "Launch DApps" step is completed

For Ubuntu users: you should first install and use X virtual framebuffer if you want to move all graphical operations to the virtual memory without showing any screen output.

sudo apt-get -y install xvfb
export DISPLAY=:99.0
sudo start-stop-daemon --start --quiet --pidfile /var/run/xvfb.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset

npm run launch-ceremony-light

Expected results:

Set Validator's personal data

Note: can be started after the previous step is completed

npm run set-validators-data-light

Expected results:

Add validator from Governance

Note: can be started after the previous step is completed

npm run add-validator

Expected results:

Launch added validator node

Note: can be started after the previous step is completed

npm run start-new-validator-node

Expected results:

Finish test POA setup

npm run stop-test-setup

For Ubuntu users: you should also stop virtual framebuffer if you started it before.
sudo start-stop-daemon --stop --quiet --pidfile /var/run/xvfb.pid --remove-pidfile