acceptance

package
v2.11.26 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RunAcceptanceTestsEnv is the environment variable that when set to
	// 'true', will instruct the test suite to run the acceptance tests.
	RunAcceptanceTestsEnv = "RUN_ACCEPTANCE"

	// CacheAcceptanceTestsEnv is the environment variable that when set to
	// 'true', will instruct the test suite to cache the application
	// directories (after being downloaded and setup) to ACCEPTANCE_IMAGE. It
	// is invalid to not have the ACCEPTANCE_IMAGE set when
	// CACHE_ACCEPTANCE_IMAGE is set to 'true'.
	CacheAcceptanceTestsEnv = "CACHE_ACCEPTANCE_IMAGE"

	// AcceptanceTestsImageEnv is the environment variable that when set, is
	// used as either the destination (when CACHE_ACCEPTANCE_IMAGE is set to
	// 'true'), or the location of the setup source code for acceptance tests.
	AcceptanceTestsImageEnv = "ACCEPTANCE_IMAGE"
)

Variables

This section is empty.

Functions

func RunTest

func RunTest(t *testing.T, apps []SourceCode, test KfAcceptanceTest)

RunTest is similar to RunKfTest but for acceptance tests instead of integration tests. It will invoke the test for each app.

func ShouldSkipAcceptance

func ShouldSkipAcceptance(t *testing.T) bool

ShouldSkipAcceptance returns true if acceptance tests are being skipped.

Types

type KfAcceptanceTest

type KfAcceptanceTest func(ctx context.Context, t *testing.T, kf *integration.Kf, appPath string)

KfAcceptanceTest is a test ran by RunTest.

type SourceCode

type SourceCode struct {
	// Name is used in t.Run(...) and as the directory name when cloning the
	// repo.
	Name string

	// Repo is the URL for git to download (e.g.,
	// https://github.com/someorg/someproject).
	Repo string

	// Path is the directory of the App source code.
	Path string

	// Setup is invoked after the repo is cloned. It can be nil.
	Setup func(*testing.T)
}

SourceCode is the key of the map provided to the RunTest. It describes the source code the tests should download.

Jump to

Keyboard shortcuts

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