mukan-consensus/test/e2e/pkg/infra/provider.go
Mukan Erkin Törük ef24c0b67e
Some checks are pending
docker-build-cometbft / vars (push) Waiting to run
docker-build-cometbft / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-cometbft / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-cometbft / merge-images (push) Blocked by required conditions
docker-build-e2e-node / vars (push) Waiting to run
docker-build-e2e-node / build-images (amd64, ubuntu-24.04) (push) Blocked by required conditions
docker-build-e2e-node / build-images (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
docker-build-e2e-node / merge-images (push) Blocked by required conditions
initial: sovereign Mukan Network fork
2026-05-11 03:18:27 +03:00

37 lines
987 B
Go

package infra
import (
"context"
e2e "github.com/cometbft/cometbft/test/e2e/pkg"
)
// Provider defines an API for manipulating the infrastructure of a
// specific set of testnet infrastructure.
type Provider interface {
// Setup generates any necessary configuration for the infrastructure
// provider during testnet setup.
Setup() error
// Starts the nodes passed as parameter. A nodes MUST NOT
// be started twice before calling StopTestnet
// If no nodes are passed, start the whole network
StartNodes(context.Context, ...*e2e.Node) error
// Stops the whole network
StopTestnet(context.Context) error
// Returns the the provider's infrastructure data
GetInfrastructureData() *e2e.InfrastructureData
}
type ProviderData struct {
Testnet *e2e.Testnet
InfrastructureData e2e.InfrastructureData
}
// Returns the the provider's infrastructure data
func (pd ProviderData) GetInfrastructureData() *e2e.InfrastructureData {
return &pd.InfrastructureData
}