testing

package module
v0.0.0-...-9eb61df Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 7 Imported by: 0

README

Go Testing

Package with testing helpers

TODO:
  • Server launcher
  • Assertion helpers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvailabilityChecker

type AvailabilityChecker interface {
	// Should return error if unable to ping (didn't pong)
	Ping() error
}

type HTTPServerChecker

type HTTPServerChecker struct {
	BaseURL string
	Cli     *http.Client
}

func (*HTTPServerChecker) Ping

func (c *HTTPServerChecker) Ping() error

type ServerLauncher

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

func NewServerLauncher

func NewServerLauncher(ctx context.Context, wd, filename string, checker AvailabilityChecker) *ServerLauncher

func (*ServerLauncher) EndAndClean

func (s *ServerLauncher) EndAndClean() error

func (*ServerLauncher) StartAndWait

func (s *ServerLauncher) StartAndWait(waitFor time.Duration) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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