Provides a Dockerfile that contains the minimal dependencies to execute unit tests of Hyperledger Indy Node.
- No need to bother about the Python version installed on local machine.
- No need to include additional package repositories required to retrieve required libraries.
- Executes arbitrary pytest unit tests on local code base.
- Build Docker image
- Configuration setting
- Execute tests
-
Install Docker
-
Open a shell, change to the build folder and execute the following command:
docker build .
This creates an unnamed image an returns the image ID.
-
You can also name (and tag) the image, e.g.
docker build -t my-test-container:latest .
Before you can execute test on the 'indy-node'code, you have at least to set the following environment variables:
INDY_NODE_PATH - Path to the root of 'indy-node' folder (must resolve to an absolute path)
DOCKER_IMAGE Tag or ID of the Docker image you built in the first step
Optionally, you can also specify the TEST_PATH as an environment variable (useful if you want the execute the same tests over and over again).
TEST PATH - Path to test folder, relative to INDY_NODE_PATH.
- Execute the script run_docker.sh located in the run folder.
- The script provides the following configuration options:
-h Prints usage information
-p INDY_PLENUM_PATH Installs Indy Plenum from specified path (must resolve to absolute path)
-v Activates verbose mode
TEST_PATH Path to test folder, takes precedence over the respective environment variable
Initial version