fakes

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuildpackFromDescriptor added in v0.5.0

func NewBuildpackFromDescriptor(descriptor dist.BuildpackDescriptor, chmod int64) (dist.Buildpack, error)

NewBuildpackFromDescriptor creates a fake buildpacks for testing purposes where tar contents are such:

	\_ buildpack.toml
	\_ bin
	\_ bin/build
 	build-contents
	\_ bin/detect
 	detect-contents

func NewFakeBuilderImage

func NewFakeBuilderImage(t *testing.T, name string, stackID, uid, gid string, metadata builder.Metadata) *fakes.Image

func NewFakeLogger

func NewFakeLogger(w io.Writer) *fakeLog

Types

type FakeImageFetcher

type FakeImageFetcher struct {
	LocalImages  map[string]imgutil.Image
	RemoteImages map[string]imgutil.Image
	FetchCalls   map[string]*FetchArgs
}

func NewFakeImageFetcher

func NewFakeImageFetcher() *FakeImageFetcher

func (*FakeImageFetcher) Fetch

func (f *FakeImageFetcher) Fetch(ctx context.Context, name string, daemon, pull bool) (imgutil.Image, error)

type FakeLifecycle

type FakeLifecycle struct {
	Opts build.LifecycleOptions
}

func (*FakeLifecycle) Execute

func (f *FakeLifecycle) Execute(ctx context.Context, opts build.LifecycleOptions) error

type FetchArgs

type FetchArgs struct {
	Daemon bool
	Pull   bool
}

Jump to

Keyboard shortcuts

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