infra

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDbInitInfoFromContainer

func GetDbInitInfoFromContainer(t testing.TB, pool *dockertest.Pool, container *Container) boundary.DbInitInfo

GetDbInitInfoFromContainer extracts info from calling `boundary database init` in the specified container. Returns a struct containing the generated info.

Types

type Config added in v0.13.0

type Config struct {
	DockerMirror string `envconfig:"DOCKER_MIRROR" default:"docker.mirror.hashicorp.services"`
}

func LoadConfig added in v0.13.0

func LoadConfig() (*Config, error)

type Container

type Container struct {
	Resource     *dockertest.Resource
	UriLocalhost string
	UriNetwork   string
}

Container stores information about the docker container

func ConnectToTarget

func ConnectToTarget(t testing.TB, pool *dockertest.Pool, network *dockertest.Network, boundaryAddr string, token string, targetId string) *Container

ConnectToTarget starts a boundary container and attempts to connect to the specified target. The goal of this method is to create a session entry in the database. Returns information about the container.

func InitBoundaryDatabase

func InitBoundaryDatabase(t testing.TB, pool *dockertest.Pool, network *dockertest.Network, postgresURI string) *Container

InitBoundaryDatabase starts a boundary container (of the latest released version) and initializes a postgres database (using `boundary database init`) at the specified postgres URI. Returns information about the container

func StartBoundary

func StartBoundary(t testing.TB, pool *dockertest.Pool, network *dockertest.Network, postgresURI string) *Container

StartBoundary starts a boundary container and spins up an instance of boundary using the specified database at postgresURI. Returns information about the container.

func StartBoundaryDatabase

func StartBoundaryDatabase(t testing.TB, pool *dockertest.Pool, network *dockertest.Network) *Container

StartBoundaryDatabase spins up a postgres database in a docker container. Returns information about the container

func StartOpenSshServer

func StartOpenSshServer(t testing.TB, pool *dockertest.Pool, network *dockertest.Network, user string, privateKeyFilePath string) *Container

StartOpenSshServer starts an openssh container to serve as a target for Boundary. Returns information about the container.

func StartVault added in v0.13.0

func StartVault(t testing.TB, pool *dockertest.Pool, network *dockertest.Network) (*Container, string)

StartVault starts a vault container. Returns information about the container.

Jump to

Keyboard shortcuts

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