testtool

package
v0.0.0-...-50b27ac Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

View Source
const BinariesEnv = "TESTTOOL_BINARIES"

Variables

This section is empty.

Functions

func GetFreePort

func GetFreePort() (string, error)

GetFreePort returns free local tcp port.

func NewBinCache

func NewBinCache() (BinCache, CloseFunc)

func RandomBinaryName

func RandomBinaryName() string

func RandomName

func RandomName() string

func WaitForPort

func WaitForPort(l logger, timeout time.Duration, port string) error

WaitForPort tries to connect to given local port with constant backoff.

Returns error if port is not ready after timeout.

Types

type BinCache

type BinCache interface {
	// GetBinary returns filesystem path to the compiled binary corresponding to given import path.
	GetBinary(importPath string) (string, error)
}

type CloseFunc

type CloseFunc func()

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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