nim-codex/testground
Tanguy 11e02b50dd
Update testground example
2022-11-25 11:15:06 -06:00
..
simple_libp2p [wip] slightly better defaults 2022-11-25 11:11:15 -06:00
simple_tcp_ping Update testground example 2022-11-25 11:15:06 -06:00
README.md [wip] basic testground/README.md 2022-11-25 11:11:15 -06:00

README.md

Codex Testground

Codex Testground makes use of Testground and testground-nim-sdk for flexible end-to-end testing and infra simulations of the Codex Network.

Prerequisites

Testground must be built, installed, and available in PATH when running make testground

$ export PATH="${HOME}/go/bin:${PATH}"

Running a Codex Testground plan locally

Assumes a local Docker daemon. For example, on macOS Docker Desktop should be installed and running.

To run the default Codex Testground plan

$ make testground

It's possible to modify a plan's build and runtime configuration via make variables

TESTGROUND_BUILDER
TESTGROUND_OPTIONS
TESTGROUND_PLAN
TESTGROUND_RUNNER
TESTGROUND_TESTCASE

For example

$ make \
  TESTGROUND_PLAN=simple_libp2p \
  TESTGROUND_OPTIONS="--instances=8" \
  testground

Take care re: shell quoting shenanigans (╯°□°)╯︵ ┻━┻

Adding a new plan

When adding a Tesground plan it should have the following basic structure

testground/[plan]/
├── Dockerfile
├── config.nims
├── main.nim
└── manifest.toml

That basic structure can be copied from e.g. testground/simple_tcp_ping, but take care to replace simple_tcp_ping with the new plan's name in Dockerfile and manifest.toml.

Running a plan in AWS, etc.

Write me. Should mainly be a matter of passing cloud credentials and configuration via make variables mentioned above. Additional make variables may need to be added.