test

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeAppendBuildEnvLike added in v1.16.0

func BeAppendBuildEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeAppendBuildEnvLike tests that an append build env has specific content.

func BeAppendLaunchEnvLike added in v1.16.0

func BeAppendLaunchEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeAppendLaunchEnvLike tests that an append launch env has specific content.

func BeAppendPathBuildEnvLike added in v1.16.0

func BeAppendPathBuildEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeAppendPathBuildEnvLike tests that an append path build env has specific content.

func BeAppendPathLaunchEnvLike added in v1.16.0

func BeAppendPathLaunchEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeAppendPathLaunchEnvLike tests that an append path launch env has specific content.

func BeAppendPathSharedEnvLike added in v1.16.0

func BeAppendPathSharedEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeAppendPathSharedEnvLike tests that an append path shared env has specific content.

func BeAppendSharedEnvLike added in v1.16.0

func BeAppendSharedEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeAppendSharedEnvLike tests that an append shared env has specific content.

func BeBuildPlanLike added in v1.16.0

func BeBuildPlanLike(t *testing.T, actual buildplan.BuildPlan, expected buildplan.BuildPlan)

BeBuildPlanLike tests that a build plan, like the output of detect or build has specific content.

func BeFileLike

func BeFileLike(t *testing.T, file string, mode os.FileMode, format string, args ...interface{})

BeFileLike tests that a file exists, has a specific mode, and specific content.

func BeLaunchMetadataLike added in v1.15.0

func BeLaunchMetadataLike(t *testing.T, layers layersPkg.Layers, expected layersPkg.Metadata)

BeLaunchMetadata tests that launch metadata has a specific configuration.

func BeLayerLike

func BeLayerLike(t *testing.T, layer layersPkg.Layer, build bool, cache bool, launch bool)

BeLayerLike tests that a layer has a specific flag configuration.

func BeOverrideBuildEnvLike added in v1.16.0

func BeOverrideBuildEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeOverrideBuildEnvLike tests that an override build env has specific content.

func BeOverrideLaunchEnvLike added in v1.16.0

func BeOverrideLaunchEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeOverrideLaunchEnvLike tests that an override launch env has specific content.

func BeOverrideSharedEnvLike added in v1.16.0

func BeOverrideSharedEnvLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeOverrideSharedEnvLike tests that an override shared env has specific content.

func BeProfileLike added in v1.16.0

func BeProfileLike(t *testing.T, layer layersPkg.Layer, name string, format string, args ...interface{})

BeProfileLike tests that a profile.d file has specific content.

func FileDoesNotExist added in v1.26.0

func FileDoesNotExist(t *testing.T, file string)

FileDoesNotExist tests that a file does not exist

func FileExists

func FileExists(t *testing.T, file string)

FileExists tests that a file exists

func FixturePath

func FixturePath(t *testing.T, fixture string) string

FixturePath returns the absolute path to the desired fixture.

func TouchFile added in v1.16.0

func TouchFile(t *testing.T, elem ...string)

TouchFile touches a file with empty content

Types

type BuildFactory

type BuildFactory struct {
	// Build is the configured build to use.
	Build build.Build

	// Home is the home directory to use.
	Home string

	// Output is the BuildPlan output at termination.
	Output buildplan.BuildPlan
}

BuildFactory is a factory for creating a test Build.

func NewBuildFactory

func NewBuildFactory(t *testing.T) *BuildFactory

NewBuildFactory creates a new instance of BuildFactory.

func (*BuildFactory) AddBuildPlan

func (f *BuildFactory) AddBuildPlan(t *testing.T, name string, dependency buildplan.Dependency)

AddBuildPlan adds an entry to a build plan.

func (*BuildFactory) AddDependency

func (f *BuildFactory) AddDependency(t *testing.T, id string, fixture string)

AddDependency adds a dependency to the buildpack metadata and copies a fixture into a cached dependency layer.

func (*BuildFactory) AddEnv

func (f *BuildFactory) AddEnv(t *testing.T, name string, value string)

AddEnv adds an environment variable to the Platform

type DetectFactory

type DetectFactory struct {
	// Detect is the configured detect to use.
	Detect detect.Detect

	// Home is the home directory to use.
	Home string

	// Output is the BuildPlan output at termination.
	Output buildplan.BuildPlan
}

DetectFactory is a factory for creating a test Detect.

func NewDetectFactory

func NewDetectFactory(t *testing.T) *DetectFactory

NewDetectFactory creates a new instance of DetectFactory.

func (*DetectFactory) AddBuildPlan

func (f *DetectFactory) AddBuildPlan(t *testing.T, name string, dependency buildplan.Dependency)

AddBuildPlan adds an entry to a build plan.

func (*DetectFactory) AddEnv

func (f *DetectFactory) AddEnv(t *testing.T, name string, value string)

AddEnv adds an environment variable to the Platform

Jump to

Keyboard shortcuts

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