testinfra

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exit

func Exit(m *testing.M, kind Kind, destination **Infra)

Exit runs cleanup before the test process exits.

func Run

func Run(m *testing.M, kind Kind, destination **Infra) int

Types

type Infra

type Infra struct {
	Host     string
	Port     int
	User     string
	Password string
	// contains filtered or unexported fields
}

func Start

func Start(ctx context.Context, kind Kind) (*Infra, error)

func (*Infra) Address

func (i *Infra) Address() string

func (*Infra) Close

func (i *Infra) Close() error

func (*Infra) MySQLDSN

func (i *Infra) MySQLDSN(database string) string

func (*Infra) PostgresDSN

func (i *Infra) PostgresDSN(database string) string

type Kind

type Kind string
const (
	MySQL    Kind = "mysql"
	Postgres Kind = "postgres"
	Redis    Kind = "redis"
)

Jump to

Keyboard shortcuts

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