test

package
v1.15.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeFileLike

func BeFileLike(t *testing.T, file string, mode os.FileMode, content string)

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 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.

Types

type BuildFactory

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

	// 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 detect.Detect

	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