testutils

package
v0.3.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package testutils collects common test utilities. Functions here create test stacks meant for integration tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstFatalError

func FirstFatalError(_ *testing.T, output string) (model.TestFatalErrorHandlerContents, error)

func GetJobFromTestOutput

func GetJobFromTestOutput(ctx context.Context, t *testing.T, c *publicapi.RequesterAPIClient, out string) model.Job

func MakeGenericJob

func MakeGenericJob() *model.Job

func MakeJob

func MakeJob(
	engineType model.Engine,
	verifierType model.Verifier,
	publisherType model.Publisher,
	entrypointArray []string) *model.Job

func MakeNoopJob

func MakeNoopJob() *model.Job

func SetupTest

func SetupTest(
	ctx context.Context,
	t *testing.T,
	nodes int, badActors int,
	lotusNode bool,
	computeConfig node.ComputeConfig,
	requesterConfig node.RequesterConfig,
	nodeOverrides ...node.NodeConfig,
) (*devstack.DevStack, *system.CleanupManager)

func SetupTestWithDefaultConfigs added in v0.3.26

func SetupTestWithDefaultConfigs(
	ctx context.Context,
	t *testing.T,
	nodes int, badActors int,
	lotusNode bool,
	nodeOverrides ...node.NodeConfig,
) (*devstack.DevStack, *system.CleanupManager)

func SetupTestWithNoopExecutor

func SetupTestWithNoopExecutor(
	ctx context.Context,
	t *testing.T,
	options devstack.DevStackOptions,
	computeConfig node.ComputeConfig,
	requesterConfig node.RequesterConfig,
	executorConfig noop_executor.ExecutorConfig,
	nodeOverrides ...node.NodeConfig,
) *devstack.DevStack

func SkipIfArm

func SkipIfArm(_ *testing.T, _ string)

func WaitForNodeDiscovery

func WaitForNodeDiscovery(t *testing.T, requesterNode *node.Node, expectedNodeCount int)

WaitForNodeDiscovery for the requester node to pick up the nodeInfo messages

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL