verify

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainersRunning

func ContainersRunning(containerNames ...string) error

ContainersRunning verifies multiple containers are running

func HTTPEndpoints

func HTTPEndpoints(endpoints map[string]int) error

HTTPEndpoints verifies multiple HTTP endpoints

func NoErrors

func NoErrors(containerName string, errorPatterns []string) error

NoErrors verifies no errors in logs

func PortsAccessible

func PortsAccessible(host string, ports ...int) error

PortsAccessible verifies multiple ports are accessible

func ServiceRunning

func ServiceRunning(groveBinary, workDir, serviceName string) error

ServiceRunning verifies a Grove service is running

Types

type AssertionLogger

type AssertionLogger interface {
	AddAssertion(description string, err error)
}

AssertionLogger is an interface for logging assertion results.

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector gathers assertion failures without stopping the test step. It logs every assertion (pass or fail) to the harness context for rich reporting.

func New

func New(ctx AssertionLogger) *Collector

New creates a new Collector linked to a context that can log assertions.

func (*Collector) Check

func (c *Collector) Check() error

Check returns a VerificationError if any assertions failed, otherwise nil.

func (*Collector) Contains

func (c *Collector) Contains(description, s, substr string)

Contains asserts that a string contains a substring, collecting failures.

func (*Collector) Equal

func (c *Collector) Equal(description string, expected, actual interface{})

Equal asserts that two values are equal, collecting failures.

func (*Collector) NotContains

func (c *Collector) NotContains(description, s, substr string)

NotContains asserts that a string does not contain a substring, collecting failures.

func (*Collector) NotEqual

func (c *Collector) NotEqual(description string, expected, actual interface{})

NotEqual asserts that two values are not equal, collecting failures.

func (*Collector) True

func (c *Collector) True(description string, value bool)

True asserts that a value is true, collecting failures.

type VerificationError

type VerificationError struct {
	Errors []error
}

VerificationError holds multiple assertion failures.

func (*VerificationError) Error

func (e *VerificationError) Error() string

Error formats all collected assertion failures into a single string.

Jump to

Keyboard shortcuts

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