https://github.com/floscha/blockchain-end2end-test
End-to-end test script for the blockchain using Docker containers.
https://github.com/floscha/blockchain-end2end-test
Last synced: 10 months ago
JSON representation
End-to-end test script for the blockchain using Docker containers.
- Host: GitHub
- URL: https://github.com/floscha/blockchain-end2end-test
- Owner: floscha
- License: mit
- Created: 2017-10-28T09:16:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T01:28:06.000Z (over 3 years ago)
- Last Synced: 2025-01-02T20:42:20.943Z (over 1 year ago)
- Language: Python
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blockchain End-to-End Test
End-to-end test script for simple blockchain implementations using Docker containers.
## Run
First make sure that Python 3 (including pip) and Docker are installed.
Then build the Docker image as described [here](https://github.com/dvf/blockchain/blob/master/README.md#docker).
Finally navigate into the project folder and run the following:
1. `pip3 install -r requirements.txt`
to make sure all requirements are installed.
2. `python3 end2end_test.py --nodes 10 --tasks clean setup connect sync-test`
to run the full test cycle with 10 blockchain nodes.
## Options
Run the *end2end_test.py* script with the following arguments:
- `--image`: The Docker image to be run. Defaults to *blockchain*.
- `--nodes`: The number of Docker containers to be run. Defaults to 2.
- `--port`: The port exposed by the Docker image. Defaults to 5000.
- `--net`: The Docker network in which nodes communicate. Defaults to *blockchain*.
- `--tasks`: Takes a number of tasks as strings, including:
- `clean`: Stops and removes all existing blockchain containers to start from a clean slate.
- `setup`: Runs the specified number of blockchain nodes as Docker containers.
- `connect`: Connect all nodes for implementations where nodes cannot find each other automatically.
- `sync-test`: Test if the synchronization mechanism between nodes works.
- `--keepalive`: Keeps the containers running after the script finishes.
While the first four arguments can be left at their defaults for [Learn Blockchains by Building One](https://github.com/dvf/blockchain), the `--tasks` argument always has to be set.