This repo contains the plugins to create the Sovrin payment ledger plugins: Token and Fees
run the following command:
./build_indy_pool
We provide a docker environment that comes pre-loaded with all required dependencies and consider this to be the easiest way for any new developer to get setup and start testing their code.
The preferred method of setting up the development environment is to use the devcontainers. All configuration files for VSCode and Gitpod are already placed in this repository. If you are new to the concept of devcontainers in combination with VSCode here is a good article about it.
Simply clone this repository and VSCode will most likely ask you to open it in the devcontainer, if you have the correct extension("ms-vscode-remote.remote-containers") installed.
If VSCode didn't ask to open it, open the command palette and use the Remote-Containers: Rebuild and Reopen in Container
command.
If you want to use Gitpod simply use this link
or if you want to work with your fork, prefix the entire URL of your branch with gitpod.io/#
so that it looks like https://gitpod.io/#https://github.com/sovrin-foundation/token-plugin/tree/ubuntu-20.04
.
Be aware that the automatic test discovery may need a kickstart via the command palette and Python: Configure Tests
.
To use this script, you will need to use make as instructed above. Once you have the docker image running and synchronized, you can use run-test.sh to run individual tests.
We have a shell script to assist with running tests. Here's an example:
./run-test.sh token test_token_req_handler test_token_req_handler_MINT_PUBLIC_validate_missing_output
The first parameter is required. It can be either token or fees. Anything else will return an error.
The remaining parameters are optional.
The second parameter is file name without the .py.
The third parameter is the name of the test.
-
To run all sovtoken tests call it like this:
./run-test.sh token
-
To run all sovtoken tests in a file, call it like this:
./run-test.sh token test_token_req_handler
All ci/cd configuration for this project is stored within /devops . This includes a makefile used to build this project. Some useful make targets are:
- image_ci builds the token-plugin image in the same manner as the ci/cd scripts. Defaults to building using a base 20.04 ubuntu image. can be customised by specifying the OSNAME ie make image_ci OSNAME=xenial
- image_ci_xenial convenience target, results in the same build as make image_ci OSNAME=xenial
- test_local_aws execute a local aws codebuild, first building the image, defaulting to a base ubuntu 20.04 image, configurable in the same method as above.
Please follow the guide here.