[go: nahoru, domu]

Skip to content

SirSevenG/mm2_testenv_composer

Repository files navigation

MarketMaker2 test environment

Based on Docker containers

Run tests:

You need working installation of Docker-ce and docker-compose. (see instructions below)

In root dir execute:

$ sudo ./test_run.sh testname

Test results are logged in log/workspace/test.log. Currently available:

dummy - starts test environment in idle mode, to use test env in this mode execute: $ docker exec -it mm2_testenv_composer_workspace_run_id /bin/bash after $ sudo test_run.sh dummy.

swaps - Performs 6 atomic swaps concurrently.

saturation - Propagates maker orders (via setprice method), until mm2 network is saturated (more than 5% orders loss).

To run tests manually and/or modify testenv performance see instructions below.

How to build:

  1. Install Docker-ce
  2. Get docker-compose with pip pip install docker-compose
  3. Unzip coin_name.zip archives in komodo/docker/bootstrap to the same folder to bootstrap test chains
  4. Create user 3003, set log catalog ownership chown -R 3003:3003 log/, bootstraps ownership chown -R 3003:3003 komodo/docker/bootstrap
  5. If needed, modify example-testname.yml and example.env files.
  6. Execute in root directory:
$ cp example-testname.yml docker-compose.yml
$ cp example.env .env
$ sudo docker-compose up --build  # with root privileges

Usage and structure:

Base containers are pulled from official Komodo repo: Komodo, atomicdex_api. You can set container tag to pull in .env. (see example.env)

workspace - as name suggest, container to execute tests from, writes logs to ./log/workspace directory

wallets - contains two test chains WSG and BSG wallets information

After tests it's suggested to stop containers docker-compose down (or ctrl+C) and execute docker system prune to clear containers cache (docker networks) before next run.

Ctop is a nice tool to manually monitor system resources usage during test run.

Network scheme

About

Env for mm2 testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published