Extract oracle/e2e (#45)

* Moved oracle/e2e to oracle-e2e

* Update build path in docker-compose

* Update link to e2e in oracle

* Introduce oracle-e2e workspace.

* Updated script and readme

* Integrated oracle-e2e into CI.
This commit is contained in:
Przemyslaw Rzad 2019-05-15 13:51:21 +02:00 committed by GitHub
parent f2cb9768f9
commit d50d579fb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 64 additions and 19 deletions

@ -25,6 +25,14 @@ jobs:
- run: git submodule update --init
- run: yarn
- run: yarn run test
oracle-e2e:
docker:
- image: circleci/node:10.15
steps:
- checkout
- setup_remote_docker
- run: yarn run oracle-e2e
workflows:
version: 2
tokenbridge:
@ -32,3 +40,4 @@ workflows:
- lint
- test
- ansible-lint
- oracle-e2e

@ -1,6 +1,6 @@
# bridge-e2e
# oracle-e2e
End to end tests for the NodeJS Bridge.
End to end tests for the POA Token Bridge [Oracle](../oracle/README.md).
## Prerequisites
@ -13,8 +13,7 @@ so that you can use the CLI without sudo.
## Running
To run the bridge end-to-end tests, you just have to go to the `e2e` directory
and run:
To run the bridge end-to-end tests, you just have to run:
```
$ ./run-tests.sh

@ -15,7 +15,7 @@ services:
ports:
- "15672:15672"
bridge:
build: ..
build: ../oracle
environment:
- NODE_ENV=production
- BRIDGE_MODE=NATIVE_TO_ERC
@ -42,7 +42,7 @@ services:
- ALLOW_HTTP=yes
command: "true"
bridge-erc:
build: ..
build: ../oracle
environment:
- NODE_ENV=production
- BRIDGE_MODE=ERC_TO_ERC
@ -70,7 +70,7 @@ services:
- ALLOW_HTTP=yes
command: "true"
bridge-erc-native:
build: ..
build: ../oracle
environment:
- NODE_ENV=production
- BRIDGE_MODE=ERC_TO_NATIVE

@ -1,5 +1,5 @@
{
"name": "bridge-e2e",
"name": "oracle-e2e",
"version": "0.0.1",
"description": "",
"main": "index.js",

@ -1,3 +1,5 @@
cd $(dirname $0)
docker-compose up -d --build --force-recreate
docker-compose run e2e npm run deploy
docker-compose run -d bridge npm run watcher:signature-request
@ -12,6 +14,7 @@ docker-compose run -d bridge-erc-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 e2e npm start
rc=$?
docker-compose down
exit $rc

@ -212,7 +212,7 @@ npm test
### E2E tests
See the [E2E README](/e2e) for instructions.
See the [E2E README](../oracle-e2e/README.md) for instructions.
*Notice*: for docker-based installations do not forget to add `docker-compose exec bridge_affirmation` before the test commands listed below.

@ -14,7 +14,7 @@
"test": "NODE_ENV=test mocha",
"test:watch": "NODE_ENV=test mocha --watch --reporter=min",
"coverage": "NODE_ENV=test nyc --reporter=text --reporter=html mocha",
"postinstall": "npm install --prefix e2e && mkdir -p logs"
"postinstall": "mkdir -p logs"
},
"author": "",
"license": "ISC",

@ -12,11 +12,14 @@
"workspaces": [
"oracle",
"bridge-ui",
"monitor"
"monitor",
"oracle-e2e"
],
"scripts": {
"lint": "yarn wsrun --exclude bridge-ui lint",
"test": "yarn wsrun --exclude bridge-ui --exclude monitor test",
"ansible-lint": "./deployment/lint.sh"
"lint": "yarn wsrun --exclude bridge-ui --exclude oracle-e2e lint",
"test": "yarn wsrun --exclude bridge-ui --exclude monitor --exclude oracle-e2e test",
"ansible-lint": "./deployment/lint.sh",
"oracle-e2e": "./oracle-e2e/run-tests.sh",
"clean": "rm -rf ./node_modules ./**/node_modules"
}
}

@ -4035,7 +4035,7 @@ dotenv@^5.0.1:
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"
integrity sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==
dotenv@^6.2.0:
dotenv@^6.0.0, dotenv@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064"
integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w==
@ -6242,6 +6242,11 @@ internal-ip@^3.0.1:
default-gateway "^2.6.0"
ipaddr.js "^1.5.2"
interpret@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==
invariant@^2.2.0, invariant@^2.2.2, invariant@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
@ -8264,7 +8269,7 @@ nan@2.10.0:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==
nan@^2.0.8, nan@^2.12.1, nan@^2.13.2, nan@^2.3.3, nan@^2.9.2:
nan@^2.0.8, nan@^2.11.0, nan@^2.12.1, nan@^2.13.2, nan@^2.3.3, nan@^2.9.2:
version "2.13.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7"
integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==
@ -10571,6 +10576,13 @@ realpath-native@^1.0.0:
dependencies:
util.promisify "^1.0.0"
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=
dependencies:
resolve "^1.1.6"
recursive-readdir@2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f"
@ -10888,7 +10900,7 @@ resolve@1.10.0:
dependencies:
path-parse "^1.0.6"
resolve@^1.10.0, resolve@^1.3.2, resolve@^1.3.3, resolve@^1.5.0, resolve@^1.6.0, resolve@^1.8.1, resolve@^1.9.0:
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.3.3, resolve@^1.5.0, resolve@^1.6.0, resolve@^1.8.1, resolve@^1.9.0:
version "1.10.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18"
integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==
@ -11301,6 +11313,15 @@ shell-quote@1.6.1:
array-reduce "~0.0.0"
jsonify "~0.0.0"
shelljs@^0.8.2:
version "0.8.3"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"
shellwords@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
@ -12277,7 +12298,7 @@ tr46@^1.0.1:
dependencies:
punycode "^2.1.0"
tree-kill@^1.1.0:
tree-kill@^1.1.0, tree-kill@^1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.1.tgz#5398f374e2f292b9dcc7b2e71e30a5c3bb6c743a"
integrity sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==
@ -12363,7 +12384,7 @@ type-is@~1.6.16, type-is@~1.6.17:
media-typer "0.3.0"
mime-types "~2.1.24"
typedarray-to-buffer@^3.1.2:
typedarray-to-buffer@^3.1.2, typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==
@ -13350,6 +13371,16 @@ websocket-extensions@>=0.1.1:
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==
websocket@^1.0.28:
version "1.0.28"
resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.28.tgz#9e5f6fdc8a3fe01d4422647ef93abdd8d45a78d3"
integrity sha512-00y/20/80P7H4bCYkzuuvvfDvh+dgtXi5kzDf3UcZwN6boTYaKvsrtZ5lIYm1Gsg48siMErd9M4zjSYfYFHTrA==
dependencies:
debug "^2.2.0"
nan "^2.11.0"
typedarray-to-buffer "^3.1.5"
yaeti "^0.0.6"
"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible":
version "1.0.26"
resolved "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"