-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ultimate E2E tests #158
Merged
Merged
Ultimate E2E tests #158
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
3abd0e6
Ultimate e2e for native to erc type of bridge
rzadp 420ff3f
One job
rzadp 0d876e9
Try to run the tests
rzadp 3f655f7
Run on CI
rzadp dbb2c41
Docs
rzadp 0c982a6
Cosmetics
rzadp 4e0a308
Final changes
rzadp bef873d
Revert the changes
rzadp 57e2ff1
Networks
rzadp ae5f96b
Waiting for Oracle
rzadp 1e70048
One job
rzadp cf939ae
Initialize the contracts submodule
rzadp c920c9b
Run on ci
rzadp 7521890
comment
rzadp 587ebfc
Sleep.
rzadp c39ad30
ultimate network
rzadp 205bb48
Docker localhost no longer needed
rzadp 9fa5ed0
Final changes
rzadp 2b568f5
Timeout
rzadp 7a1b98b
Naming
rzadp 0006ce4
Merge branch 'master' into ultimate-e2e
rzadp dfd5474
Merge master into ultimate-e2e
rzadp 2fe6a5f
Sleep task.
rzadp 1d54f73
Merge branch 'master' into ultimate-e2e
rzadp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
- import_playbook: ../../site.yml | ||
- import_playbook: ./overwrite-docker-compose.yml | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
deployment/molecule/ultimate-native-to-erc/overwrite-docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
# The Oracle's docker-compose file has to be modified, in order to join the docker containers over network with the parity containers | ||
- name: Overwrite the docker-compose | ||
hosts: oracle | ||
become: true | ||
tasks: | ||
- name: stop the service | ||
shell: service poabridge stop | ||
|
||
- name: Slurp docker compose file | ||
slurp: | ||
src: "/home/poadocker/bridge/oracle/docker-compose.yml" | ||
register: docker_compose_slurp | ||
- name: Parse docker compose file | ||
set_fact: | ||
docker_compose_parsed: "{{ docker_compose_slurp['content'] | b64decode | from_yaml }}" | ||
|
||
- name: Add the external network used to connect to Parity nodes | ||
set_fact: | ||
docker_compose_parsed: "{{ docker_compose_parsed |combine({'networks': {'ultimate': {'external': 'true'}}}, recursive=True) }}" | ||
|
||
- name: Add all Oracle containers to the network | ||
set_fact: | ||
docker_compose_parsed: "{{ docker_compose_parsed | combine({'services': {item: {'networks': docker_compose_parsed.services[item].networks | union(['ultimate'])}}}, recursive=True) }}" | ||
with_items: "{{ docker_compose_parsed.services }}" | ||
|
||
- name: Expose Redis port to allow connecting from redis-cli | ||
set_fact: | ||
docker_compose_parsed: "{{ docker_compose_parsed | combine({'services': {'redis': {'ports': ['6379:6379']}}}, recursive=True) }}" | ||
|
||
- name: Write new docker-compose file | ||
copy: | ||
content: "{{ docker_compose_parsed | to_yaml }}" | ||
dest: "/home/poadocker/bridge/oracle/docker-compose.yml" | ||
|
||
- name: start the service | ||
shell: service poabridge start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# POA TokenBridge / Ultimate E2E | ||
|
||
Documentation regarding the Ultimate end-to-end tests. | ||
|
||
## Overview | ||
|
||
The ultimate e2e test scenario covers native-to-erc type of bridge. | ||
It runs the e2e tests on components deployed using the deployment playbooks. | ||
|
||
|
||
## Usage | ||
|
||
### 1. Prepare the infrastructure | ||
|
||
Run the Parity nodes, deploy the bridge contracts, deploy Oracle using the deployment playbook. | ||
|
||
```bash | ||
./up.sh deploy native-to-erc | ||
``` | ||
|
||
### 2. Run the E2E tests | ||
|
||
``` | ||
docker-compose run e2e yarn workspace oracle-e2e run native-to-erc | ||
``` | ||
|
||
## Diagram | ||
|
||
![diagram](./ultimate.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modification of Oracle's
docker-compose.yml
file is necessary in order to addultimate
network - joining the containers with parity containers