integration

package
v0.0.0-...-e441287 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFileAndExec

func ReadFileAndExec(name string, conn *sql.DB, panicOnError bool)

ReadFileAndExec read .sql file end exec

Types

type Container

type Container struct {
	Container testcontainers.Container
	// contains filtered or unexported fields
}

Container represents a mock-server container

func CreateMsSqlContainer

func CreateMsSqlContainer(ctx context.Context, req ContainerRequest) (*Container, error)

CreateMsSqlContainer creates a SQL Server for Linux container

func (*Container) GoConnectionString

func (c *Container) GoConnectionString(ctx context.Context) (string, error)

GoConnectionString returns a connection string suitable for usage in Go

func (Container) HostAndPort

func (c Container) HostAndPort(ctx context.Context) (string, nat.Port, error)

HostAndPort retrieves the external host and port of the container

type ContainerRequest

type ContainerRequest struct {
	testcontainers.GenericContainerRequest
	Username string
	Password string
	DbName   string
	Image    string
	Logger   *testcontainers.LogConsumer
}

ContainerRequest a container request specification

Jump to

Keyboard shortcuts

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