Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea
tests/config/parity/keys/UnlimitedChain/
/out
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ language: nix
git:
depth: 1
submodules: false
sudo: required
services:
- docker
script:
- nix run nixpkgs.shellcheck -c shellcheck scripts/* set-* *-deploy load-addresses
- tests/test.sh
1 change: 1 addition & 0 deletions tests/config/parity/keys/DevelopmentChain/key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"032b64c7-38c6-dfb4-714a-25eacd2daecc","version":3,"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"38f902a7336bf5160c427f499a6ded5c"},"ciphertext":"afcc67f82dd5327181a75cbd33319301575577f42aa42083f4f6620dcbb6fa60","kdf":"pbkdf2","kdfparams":{"c":10240,"dklen":32,"prf":"hmac-sha256","salt":"c7b2c641170cfb25a06c60e51d08bdf4e11d51acdfd65aaf832e2d7b13470812"},"mac":"dca205a615725a79073baec0e015a7a5c1d51c72d861081f2c26296abe7cec09"},"address":"00a329c0648769a73afac7f9381e08fb43dbea72","name":"Development Account","meta":"{\"description\":\"Never use this account outside of development chain!\",\"passwordHint\":\"Password is empty string\"}"}
55 changes: 55 additions & 0 deletions tests/config/parity/parity-dev-constantinopole.json

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions tests/deploy-mcd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

. /home/maker/.nix-profile/etc/profile.d/nix.sh

git clone https://github.com/makerdao/testchain-dss-deployment-scripts.git src
cd src
git submodule update --init --recursive

export TESTNET_HOST="parity"
export KEYSTORE_PATH=/testchain-data/keys/DevelopmentChain
export ETH_FROM=0x00a329c0648769A73afAc7F9381E08FB43dBEA72

. scripts/setup-env.sh
./step-1-deploy
./step-2-deploy
./step-3-deploy
./step-4-deploy
6 changes: 6 additions & 0 deletions tests/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#/bin/bash

docker-compose -f tests/tests-stack.yml up --abort-on-container-exit testchain-dss-deployer
TEST_RESULT=$?
docker-compose -f tests/tests-stack.yml down
exit $TEST_RESULT
35 changes: 35 additions & 0 deletions tests/tests-stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: "3.2"
services:
parity:
image: parity/parity:stable
container_name: parity
ports:
- "8545:8545"
- "8546:8546"
expose:
- "8545"
- "8546"
user: root
working_dir: /home/parity
volumes:
- $PWD/tests/config/parity/keys:/home/parity/.local/share/io.parity.ethereum/keys
- $PWD/tests/config/parity/parity-dev-constantinopole.json:/home/parity/config/parity-dev-constantinopole.json
command: ["--chain=/home/parity/config/parity-dev-constantinopole.json",
"--tracing=on",
"--pruning=archive",
"--jsonrpc-interface=all",
"--jsonrpc-hosts=all",
"--base-path=/home/parity/.local/share/io.parity.ethereum/"]

testchain-dss-deployer:
image: makerdao/dapphub-tools
container_name: testchain-dss-deployer
privileged: true
working_dir: /home/maker
depends_on:
- parity
volumes:
- $PWD/tests/config/parity/keys:/testchain-data/keys
- $PWD/tests/deploy-mcd.sh:/home/maker/deploy-mcd.sh
command: >
/home/maker/deploy-mcd.sh