Skip to content

pSchlarb/token-plugin-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img

Open in Gitpod

Table of Contents

  1. Sovrin Token Plugins
    1. Install
    2. Development Environment
      1. Why cant I use my own local machine as my enviroment?
      2. How to Start Working with the Code
      3. Alternative for running tests
    3. How To Contribute

Hex.pm GitHub version

Sovrin Token Plugins

This repo contains the plugins to create the Sovrin payment ledger plugins: Token and Fees

Install

run the following command:

./build_indy_pool

Development Environment

Why is a docker environment included?

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.

How to Start Working with the 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.

Alternative for running 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.

  1. To run all sovtoken tests call it like this:

    ./run-test.sh token
    
  2. To run all sovtoken tests in a file, call it like this:

    ./run-test.sh token test_token_req_handler
    

Devops ci/cd

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:

  1. 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
  2. image_ci_xenial convenience target, results in the same build as make image_ci OSNAME=xenial
  3. 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.

How To Contribute

Please follow the guide here.

About

source code and tests for Sovrin Ledger plugins

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 92.7%
  • Shell 2.1%
  • Dockerfile 1.9%
  • Groovy 1.9%
  • Makefile 1.2%
  • Ruby 0.2%