massalabs / massa-test-framework

1 stars 0 forks source link

Massa test framework

A framework for Massa core dev to develop functional tests

Quick start

from pathlib import Path
from massa_test_framework import ServerOpts, Server, Node

# init a Server (using your computer)
server_opts = ServerOpts(local=True)
server = Server(server_opts) 
# create a Node object, use compilation from given path (assuming here it's compiled here in Sandbox mode)
node1 = Node.from_dev(server, repo=Path("~/dev/massa").expanduser())
# setup config
with node1.edit_config() as cfg:
    cfg["logging"]["level"] = 3

# start node
with node1.start():
    # Wait for node to be ready - aka node returns a valid last period
    node1.wait_ready(20)

    # Call get_status
    status = node1.get_status()
    print(status)

Documentation

Contrib rules

Setup

Tools

Note:

Generating massa_grpc