testutils

package
v1.6.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeString = "string"
)

Variables

This section is empty.

Functions

func CreateComputeEventStore added in v1.6.0

func CreateComputeEventStore(t *testing.T) watcher.EventStore

func CreateJobEventStore added in v1.6.0

func CreateJobEventStore(t *testing.T) watcher.EventStore

func CreateNatsClient added in v1.6.0

func CreateNatsClient(t *testing.T, url string) *nats.Conn

func CreateStringEventStore added in v1.6.0

func CreateStringEventStore(t *testing.T) (watcher.EventStore, *envelope.Registry)

CreateStringEventStore creates a new event store for string events using BoltDB and returns both the event store and an envelope registry. The returned EventStore must be closed by the caller when no longer needed.

func GetJobFromTestOutput

func GetJobFromTestOutput(ctx context.Context, t *testing.T, c clientv2.API, out string) *models.Job

func IsIPFSEnabled added in v1.4.0

func IsIPFSEnabled(ipfsConnect string) bool

IsIPFSEnabled will return true if the test is running in an environment that can support IPFS.

func MustHaveIPFS added in v1.4.0

func MustHaveIPFS(t testing.TB, cfg types.Bacalhau)

MustHaveIPFS will skip the test if the test is running in an environment that cannot support IPFS. Otherwise it returns an IPFS connect string

func RestartNatsServer added in v1.5.2

func RestartNatsServer(t *testing.T, natsServer *natsserver.Server) (*natsserver.Server, *nats.Conn)

RestartNatsServer will restart the NATS server and return a new server and client using the same port

func SkipIfArm

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

func StartNats added in v1.5.0

func StartNats(t *testing.T) (*natsserver.Server, *nats.Conn)

StartNats will start a NATS server on a random port and return a server and client instances

func StartNatsServer added in v1.6.0

func StartNatsServer(t *testing.T) *natsserver.Server

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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