Documentation
¶
Index ¶
- func ContainersRunning(containerNames ...string) error
- func HTTPEndpoints(endpoints map[string]int) error
- func NoErrors(containerName string, errorPatterns []string) error
- func PortsAccessible(host string, ports ...int) error
- func ServiceRunning(groveBinary, workDir, serviceName string) error
- type AssertionLogger
- type Collector
- func (c *Collector) Check() error
- func (c *Collector) Contains(description, s, substr string)
- func (c *Collector) Equal(description string, expected, actual interface{})
- func (c *Collector) NotContains(description, s, substr string)
- func (c *Collector) NotEqual(description string, expected, actual interface{})
- func (c *Collector) True(description string, value bool)
- type VerificationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainersRunning ¶
ContainersRunning verifies multiple containers are running
func HTTPEndpoints ¶
HTTPEndpoints verifies multiple HTTP endpoints
func PortsAccessible ¶
PortsAccessible verifies multiple ports are accessible
func ServiceRunning ¶
ServiceRunning verifies a Grove service is running
Types ¶
type AssertionLogger ¶
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 ¶
Check returns a VerificationError if any assertions failed, otherwise nil.
func (*Collector) Contains ¶
Contains asserts that a string contains a substring, collecting failures.
func (*Collector) NotContains ¶
NotContains asserts that a string does not contain a substring, 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.