e2e

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerConfiguration

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

ContainerConfiguration configures e.g. wait strategies and ports for the container

type ContainerEnvironment

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

ContainerEnvironment handles the container lifecycle for the E2E tests

func (*ContainerEnvironment) Configure

func (env *ContainerEnvironment) Configure(config ContainerConfiguration)

Configure the environment but does not start it yet

func (*ContainerEnvironment) Host

func (env *ContainerEnvironment) Host(ctx context.Context, service ServiceID) (string, error)

Host tries to get host where the container port is exposed

func (*ContainerEnvironment) Port

func (env *ContainerEnvironment) Port(ctx context.Context, service ServiceID, port string) (string, error)

Port tries get externally mapped port for a container port

func (*ContainerEnvironment) Start

func (env *ContainerEnvironment) Start(ctx context.Context) error

Start starts all required container for the E2E tests (PostgreSQL, MongoDB, MySql) and waits for them to be up

func (*ContainerEnvironment) Stop

func (env *ContainerEnvironment) Stop(ctx context.Context)

Stop will terminate all running container

type Request

type Request struct {
	Name       string            `yaml:"name"`
	Method     string            `yaml:"method"`
	URL        string            `yaml:"url"`
	Body       string            `yaml:"body"`
	StatusCode int               `yaml:"statusCode"`
	Headers    map[string]string `yaml:"header"`
}

Request represents a single E2E test

func (*Request) Defaults

func (r *Request) Defaults()

Defaults sets default values for required properties, if they are not set

type ServiceID

type ServiceID string

ServiceID represents a service (container) required by the E2E tests

const (
	// ServicePostgreSQL represents a PostgreSQL instance
	ServicePostgreSQL ServiceID = "pg"
	// ServiceMySQL represents a MySQL instance
	ServiceMySQL ServiceID = "mysql"
	// ServiceMongoDB represents a MongoDB instance
	ServiceMongoDB ServiceID = "mongo"
)

Jump to

Keyboard shortcuts

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