diff --git a/.circleci/config.yml b/.circleci/config.yml index e6701637..f6b3a880 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -250,3 +250,8 @@ workflows: scenario-name: erc-to-native redis-key: erc-native-collected-signatures:lastProcessedBlock ui-e2e-grep: "ERC TO NATIVE" + - ultimate: + name: "ultimate: erc to erc" + scenario-name: erc-to-erc + redis-key: erc-erc-collected-signatures:lastProcessedBlock + ui-e2e-grep: "ERC TO ERC" diff --git a/deployment/group_vars/erc-to-erc.yml b/deployment/group_vars/erc-to-erc.yml new file mode 100644 index 00000000..765812e3 --- /dev/null +++ b/deployment/group_vars/erc-to-erc.yml @@ -0,0 +1,7 @@ +--- +BRIDGE_MODE: "ERC_TO_ERC" +HOME_BRIDGE_ADDRESS: "0x1feB40aD9420b186F019A717c37f5546165d411E" +FOREIGN_BRIDGE_ADDRESS: "0x4a58D6d8D416a5fBCAcf3dC52eb8bE8948E25127" +ERC20_TOKEN_ADDRESS: "0x3C665A31199694Bf723fD08844AD290207B5797f" +UI_PORT: 3001 +MONITOR_PORT: 3011 diff --git a/deployment/molecule/ultimate-erc-to-erc/Dockerfile.j2 b/deployment/molecule/ultimate-erc-to-erc/Dockerfile.j2 new file mode 100644 index 00000000..e6aa95d3 --- /dev/null +++ b/deployment/molecule/ultimate-erc-to-erc/Dockerfile.j2 @@ -0,0 +1,14 @@ +# Molecule managed + +{% if item.registry is defined %} +FROM {{ item.registry.url }}/{{ item.image }} +{% else %} +FROM {{ item.image }} +{% endif %} + +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ + elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \ + elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ + elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \ + elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ + elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi diff --git a/deployment/molecule/ultimate-erc-to-erc/molecule.yml b/deployment/molecule/ultimate-erc-to-erc/molecule.yml new file mode 100644 index 00000000..d953ae1f --- /dev/null +++ b/deployment/molecule/ultimate-erc-to-erc/molecule.yml @@ -0,0 +1,56 @@ +--- +driver: + name: docker +platforms: + - name: oracle-erc-to-erc-host + groups: + - ultimate + - erc-to-erc + children: + - oracle + image: ubuntu:16.04 + privileged: true + network_mode: host + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - name: ui-erc-to-erc-host + groups: + - ultimate + - erc-to-erc + children: + - ui + image: ubuntu:16.04 + privileged: true + network_mode: host + volumes: + - /var/run/docker.sock:/var/run/docker.sock +provisioner: + name: ansible + playbooks: + prepare: ../prepare.yml + converge: ../ultimate-commons/converge.yml + inventory: + host_vars: + oracle-erc-to-erc-host: + bridge_repo_branch: $CODEBASE_BRANCH + HOME_RPC_URL: "http://parity1:8545" + FOREIGN_RPC_URL: "http://parity2:8545" + VALIDATOR_ADDRESS: "0xaaB52d66283F7A1D5978bcFcB55721ACB467384b" + VALIDATOR_ADDRESS_PRIVATE_KEY: "8e829f695aed89a154550f30262f1529582cc49dc30eff74a6b491359e0230f9" + ui-erc-to-erc-host: + bridge_repo_branch: $CODEBASE_BRANCH + HOME_RPC_URL: "http://localhost:8541" + FOREIGN_RPC_URL: "http://localhost:8542" +verifier: + name: testinfra + lint: + name: flake8 +scenario: + name: ultimate-erc-to-erc + test_sequence: + - cleanup + - destroy + - syntax + - create + - prepare + - converge diff --git a/e2e-commons/up.sh b/e2e-commons/up.sh index 25036534..fc97d86c 100755 --- a/e2e-commons/up.sh +++ b/e2e-commons/up.sh @@ -52,5 +52,9 @@ while [ "$1" != "" ]; do ../deployment/molecule/molecule.sh ultimate-erc-to-native fi + if [ "$1" == "erc-to-erc" ]; then + ../deployment/molecule/molecule.sh ultimate-erc-to-erc + fi + shift # Shift all the parameters down by one done diff --git a/ui-e2e/test.js b/ui-e2e/test.js index fb1cec90..046a9d21 100644 --- a/ui-e2e/test.js +++ b/ui-e2e/test.js @@ -131,6 +131,7 @@ test.describe('e2e-test for bridge.poa, version 1.5.0', async function() { test.describe('ERC TO ERC', async () => { test.it('User is able to open main page of bridge-ui ', async () => { + await foreignAccount.setMetaMaskNetwork() startURL = await Utils.getErc20StartURL() const result = await mainPage.open(startURL) console.log('Test URL: ' + startURL)