devenv

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package devenv implements helpers for e2e tests in interacting with a devenv.

Index

Constants

This section is empty.

Variables

View Source
var Logger = &logrus.Logger{Out: os.Stderr, Level: logrus.DebugLevel, ReportCaller: true,
	Formatter: &logrus.TextFormatter{ForceColors: true}}

Logger is the logger that should be used for tests

Functions

func DestroyDevenv

func DestroyDevenv(ctx context.Context, b *box.Config) error

DestroyDevenv destroys a devenv

func ProvisionDevenv

func ProvisionDevenv(t *testing.T, ctx context.Context, opts *ProvisionOpts) func()

ProvisionDevenv creates a devenv based on the following options and returns a function to destroy it.

Types

type ProvisionOpts

type ProvisionOpts struct {
	// SnapshotTarget is the target snapshot to deploy
	// if empty, defaults to none.
	SnapshotTarget string

	// Apps is a list of apps to deploy to this devenv
	Apps []string

	// Box is the box config to use when provisioning the devenv
	// this is required. Note: Do not use the host box. Using it may
	// result in inconsistent test runs.
	Box *box.Config
}

ProvisionOpts are arguments to pass to a devenv provision

Jump to

Keyboard shortcuts

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