Skip to content

Commit

Permalink
Merge pull request #217 from poanetwork/216-fix-e2e-urls
Browse files Browse the repository at this point in the history
Update e2e tests urls
  • Loading branch information
akolotov authored May 16, 2019
2 parents cfe76f9 + d8dc2fd commit 1f0673e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 56 deletions.
4 changes: 2 additions & 2 deletions e2e-script/MetaMask.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ class MetaMask extends Page {
let url;
switch (provider) {
case 77: {
url = "http://10.1.0.102:8545";
url = "http://localhost:8541";
networks.push(177);
break;
}
case 42: {
url = "http://10.1.0.103:8545";
url = "http://localhost:8542";
networks.push(142);
break;
}
Expand Down
6 changes: 3 additions & 3 deletions e2e-script/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"startUrl" : "http://10.1.0.101:3000",
"erc20Url" : "http://10.1.0.104:3000",
"erc20NativeUrl" : "http://10.1.0.105:3000",
"startUrl" : "http://localhost:3000",
"erc20Url" : "http://localhost:3001",
"erc20NativeUrl" : "http://localhost:3002",
"homeAccount": "./e2e-script/accounts/user77_7FC1.json",
"foreignAccount": "./e2e-script/accounts/user42_7FC1.json"
}
52 changes: 6 additions & 46 deletions e2e-script/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,21 @@ version: '3'
services:
parity1:
build: parity
networks:
testnet:
ipv4_address: 10.1.0.102
ports:
- "8541:8545"
parity2:
build:
context: parity
dockerfile: Dockerfile-foreign
networks:
testnet:
ipv4_address: 10.1.0.103
ports:
- "8542:8545"
contracts:
build: contracts
networks:
- testnet
command: "true"
redis:
image: "redis:4"
networks:
- testnet
rabbit:
image: "rabbitmq:3-management"
networks:
- testnet
ports:
- "15672:15672"
bridge:
Expand Down Expand Up @@ -57,8 +45,6 @@ services:
- HOME_POLLING_INTERVAL=500
- FOREIGN_POLLING_INTERVAL=500
- ALLOW_HTTP=yes
networks:
- testnet
command: "true"
bridge-erc20:
build: bridge
Expand Down Expand Up @@ -87,8 +73,6 @@ services:
- HOME_POLLING_INTERVAL=500
- FOREIGN_POLLING_INTERVAL=500
- ALLOW_HTTP=yes
networks:
- testnet
command: "true"
bridge-erc20-native:
build: bridge
Expand Down Expand Up @@ -117,16 +101,14 @@ services:
- HOME_POLLING_INTERVAL=500
- FOREIGN_POLLING_INTERVAL=500
- ALLOW_HTTP=yes
networks:
- testnet
command: "true"
ui:
build: ..
environment:
- REACT_APP_HOME_BRIDGE_ADDRESS=0x32198D570fffC7033641F8A9094FFDCaAEF42624
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x2B6871b9B02F73fa24F4864322CdC78604207769
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://10.1.0.103:8545
- REACT_APP_HOME_HTTP_PARITY_URL=http://10.1.0.102:8545
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://localhost:8542
- REACT_APP_HOME_HTTP_PARITY_URL=http://localhost:8541
- REACT_APP_HOME_NATIVE_NAME=POA
- REACT_APP_HOME_NETWORK_NAME=Sokol
- REACT_APP_FOREIGN_NETWORK_NAME=Kovan
Expand All @@ -142,19 +124,14 @@ services:
- REACT_APP_FOREIGN_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_FOREIGN_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
ports:
- "3000:3000"
networks:
testnet:
ipv4_address: 10.1.0.101
command: "true"
ui-erc20:
build: ..
environment:
- REACT_APP_HOME_BRIDGE_ADDRESS=0x1feB40aD9420b186F019A717c37f5546165d411E
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x4a58D6d8D416a5fBCAcf3dC52eb8bE8948E25127
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://10.1.0.103:8545
- REACT_APP_HOME_HTTP_PARITY_URL=http://10.1.0.102:8545
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://localhost:8542
- REACT_APP_HOME_HTTP_PARITY_URL=http://localhost:8541
- REACT_APP_HOME_NATIVE_NAME=POA
- REACT_APP_HOME_NETWORK_NAME=Sokol
- REACT_APP_FOREIGN_NETWORK_NAME=Kovan
Expand All @@ -170,19 +147,14 @@ services:
- REACT_APP_FOREIGN_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_FOREIGN_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
ports:
- "3001:3000"
networks:
testnet:
ipv4_address: 10.1.0.104
command: "true"
ui-erc20-native:
build: ..
environment:
- REACT_APP_HOME_BRIDGE_ADDRESS=0x488Af810997eD1730cB3a3918cD83b3216E6eAda
- REACT_APP_FOREIGN_BRIDGE_ADDRESS=0x488Af810997eD1730cB3a3918cD83b3216E6eAda
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://10.1.0.103:8545
- REACT_APP_HOME_HTTP_PARITY_URL=http://10.1.0.102:8545
- REACT_APP_FOREIGN_HTTP_PARITY_URL=http://localhost:8542
- REACT_APP_HOME_HTTP_PARITY_URL=http://localhost:8541
- REACT_APP_HOME_NATIVE_NAME=POA
- REACT_APP_HOME_NETWORK_NAME=Sokol
- REACT_APP_FOREIGN_NETWORK_NAME=Kovan
Expand All @@ -198,16 +170,4 @@ services:
- REACT_APP_FOREIGN_GAS_PRICE_SPEED_TYPE=standard
- REACT_APP_FOREIGN_GAS_PRICE_FALLBACK=5000000000
- REACT_APP_FOREIGN_GAS_PRICE_UPDATE_INTERVAL=15000
ports:
- "3002:3000"
networks:
testnet:
ipv4_address: 10.1.0.105
command: "true"
networks:
testnet:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.1.0.0/24
6 changes: 3 additions & 3 deletions e2e-script/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ docker-compose run -d bridge-erc20-native npm run watcher:collected-signatures
docker-compose run -d bridge-erc20-native npm run watcher:affirmation-request
docker-compose run -d bridge npm run sender:home
docker-compose run -d bridge npm run sender:foreign
docker-compose run -d ui npm start
docker-compose run -d ui-erc20 npm start
docker-compose run -d ui-erc20-native npm start
docker-compose run -d -p 3000:3000 ui npm start
docker-compose run -d -p 3001:3000 ui-erc20 npm start
docker-compose run -d -p 3002:3000 ui-erc20-native npm start
cd ..
npm run startE2e
rc=$?
Expand Down
4 changes: 2 additions & 2 deletions e2e-script/scripts/blocks.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Web3 = require('web3')

const homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://10.1.0.102:8545'))
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://10.1.0.103:8545'))
const homeWeb3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8541'))
const foreignWeb3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8542'))
const account = '0x7FC1442AB55Da569940Eb750AaD2BAA63DA4010E'
const privateKey = '0x460635eb4ac4287de2d2393985e19b4a9f948ac533453a1044ab8d50330b0df9'
homeWeb3.eth.accounts.wallet.add(privateKey)
Expand Down

0 comments on commit 1f0673e

Please sign in to comment.