Skip to content

Commit 74f46d2

Browse files
author
grandizzy
committed
Add integration tests
1 parent 7db9613 commit 74f46d2

File tree

7 files changed

+120
-0
lines changed

7 files changed

+120
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
.idea
2+
tests/config/parity/keys/UnlimitedChain/
13
/out

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ language: nix
44
git:
55
depth: 1
66
submodules: false
7+
sudo: required
8+
services:
9+
- docker
710
script:
811
- nix run nixpkgs.shellcheck -c shellcheck scripts/* set-* *-deploy load-addresses
12+
- sudo ./test.sh

test.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#/bin/bash
2+
3+
docker-compose -f tests-stack.yml up --abort-on-container-exit testchain-dss-deployer
4+
TEST_RESULT=$?
5+
docker-compose -f tests-stack.yml down
6+
exit $TEST_RESULT

tests-stack.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: "3.2"
2+
services:
3+
parity:
4+
image: parity/parity:stable
5+
container_name: parity
6+
ports:
7+
- "8545:8545"
8+
- "8546:8546"
9+
expose:
10+
- "8545"
11+
- "8546"
12+
user: root
13+
working_dir: /home/parity
14+
volumes:
15+
- $PWD/tests/config/parity/keys:/home/parity/.local/share/io.parity.ethereum/keys
16+
- $PWD/tests/config/parity/parity-dev-constantinopole.json:/home/parity/config/parity-dev-constantinopole.json
17+
command: ["--chain=/home/parity/config/parity-dev-constantinopole.json",
18+
"--tracing=on",
19+
"--pruning=archive",
20+
"--jsonrpc-interface=all",
21+
"--jsonrpc-hosts=all",
22+
"--base-path=/home/parity/.local/share/io.parity.ethereum/"]
23+
24+
testchain-dss-deployer:
25+
image: makerdao/dapphub-tools
26+
container_name: testchain-dss-deployer
27+
privileged: true
28+
working_dir: /home/maker
29+
depends_on:
30+
- parity
31+
volumes:
32+
- $PWD/tests/config/parity/keys:/testchain-data/keys
33+
- $PWD/tests/deploy-mcd.sh:/home/maker/deploy-mcd.sh
34+
command: >
35+
/home/maker/deploy-mcd.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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\"}"}

tests/config/parity/parity-dev-constantinopole.json

+55
Large diffs are not rendered by default.

tests/deploy-mcd.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
. /home/maker/.nix-profile/etc/profile.d/nix.sh
4+
5+
git clone https://github.com/makerdao/testchain-dss-deployment-scripts.git src
6+
cd src
7+
git submodule update --init --recursive
8+
9+
export TESTNET_HOST="parity"
10+
export KEYSTORE_PATH=/testchain-data/keys/DevelopmentChain
11+
export ETH_FROM=0x00a329c0648769A73afAc7F9381E08FB43dBEA72
12+
13+
. scripts/setup-env.sh
14+
./step-1-deploy
15+
./step-2-deploy
16+
./step-3-deploy
17+
./step-4-deploy

0 commit comments

Comments
 (0)