From d8dc2fd13fd273aaa140357446ec96198fe3c963 Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Wed, 15 May 2019 10:46:37 -0300 Subject: [PATCH] Update e2e tests urls --- e2e-script/MetaMask.js | 4 +-- e2e-script/config.json | 6 ++-- e2e-script/docker-compose.yml | 52 ++++------------------------------- e2e-script/run-tests.sh | 6 ++-- e2e-script/scripts/blocks.js | 4 +-- 5 files changed, 16 insertions(+), 56 deletions(-) diff --git a/e2e-script/MetaMask.js b/e2e-script/MetaMask.js index 017bd4c7..5da659dc 100644 --- a/e2e-script/MetaMask.js +++ b/e2e-script/MetaMask.js @@ -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; } diff --git a/e2e-script/config.json b/e2e-script/config.json index 31e1ba00..7da68d12 100644 --- a/e2e-script/config.json +++ b/e2e-script/config.json @@ -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" } diff --git a/e2e-script/docker-compose.yml b/e2e-script/docker-compose.yml index ced60577..fdb0a505 100644 --- a/e2e-script/docker-compose.yml +++ b/e2e-script/docker-compose.yml @@ -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: @@ -57,8 +45,6 @@ services: - HOME_POLLING_INTERVAL=500 - FOREIGN_POLLING_INTERVAL=500 - ALLOW_HTTP=yes - networks: - - testnet command: "true" bridge-erc20: build: bridge @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/e2e-script/run-tests.sh b/e2e-script/run-tests.sh index 0c1a0139..61a02396 100755 --- a/e2e-script/run-tests.sh +++ b/e2e-script/run-tests.sh @@ -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=$? diff --git a/e2e-script/scripts/blocks.js b/e2e-script/scripts/blocks.js index 787e2aea..59467a99 100644 --- a/e2e-script/scripts/blocks.js +++ b/e2e-script/scripts/blocks.js @@ -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)