spacemeshos / pm

Project management. Meta-tasks related to research, dev, and specs for the Spacemesh protocol and infrastructure.
http://spacemesh.io/
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Testground epic #88

Closed y0sher closed 6 months ago

y0sher commented 2 years ago

Motivation

Our current CI

Utilizes K8S and python’s pytest, it runs ELK with fluentbit, collecting logs that are used for testing and for later for debugging. .It also runs a Pyroscope instance for viewing profiles. Same code also manages the deployment of bootstrap, poets, miners and wiring them together. The test setups the the configurations and interacts with the entities using the API. It then queries Elasticsearch or the API for data to run assertions otheron the test state.

Pros:

Testground

Testground is a platform for testing, benchmarking, and simulating distributed and p2p systems at scale. It's designed to be multi-lingual and runtime-agnostic, scaling gracefully from 2 to 10k instances, only when needed.

Pros

Cons

Running

Prerequisites: Go 1.16+, Docker daemon running.

$ git clone https://github.com/testground/testground.git

$ cd testground

$ make install       # builds testground and the Docker image, used by the local:docker runner.

$ testground daemon  # will start the daemon listening on localhost:8042 by default.

# => open a different console (client-side), in the same directory (testground/testground repo checkout)

# import the network test plan from this repo into $TESTGROUND_HOME/plans
# read more about this path at https://docs.testground.ai/getting-started#running-testground
$ testground plan import --from ./plans/network

# run two instances of the `start` test case from the `network` plan,
# building with docker:go, running with local:docker
$ testground run single --plan=network --testcase=start \
                        --builder=docker:generic --runner=local:docker \
                        --instances=5

TODO: (@y0sher): Add docs about reading logs and using node API and metrics. The test currently runs 1 PoET, 1 bootstrap ,3 miners and publishes the addresses of PoET and bootstrap.

(TODO: create issues and link)

Changes

y0sher commented 2 years ago

I'm raising here some concerns I have with testground, I'll edit this comment later and add more details