package fakecontext
import "github.com/docker/cli/components/engine/integration-cli/cli/build/fakecontext"
Index ¶
- func WithBinaryFiles(files map[string]*bytes.Buffer) func(*Fake) error
- func WithDockerfile(content string) func(*Fake) error
- func WithFile(name, content string) func(*Fake) error
- func WithFiles(files map[string]string) func(*Fake) error
- type Fake
Functions ¶
func WithBinaryFiles ¶
WithBinaryFiles adds the specified files in the build context, content is binary
func WithDockerfile ¶
WithDockerfile adds the specified content as Dockerfile in the build context
func WithFile ¶
WithFile adds the specified file (with content) in the build context
func WithFiles ¶
WithFiles adds the specified files in the build context, content is a string
Types ¶
type Fake ¶
type Fake struct { Dir string }
Fake creates directories that can be used as a build context
func New ¶
New creates a fake build context
func (*Fake) Add ¶
Add a file at a path, creating directories where necessary
func (*Fake) AsTarReader ¶
func (f *Fake) AsTarReader(t testingT) io.ReadCloser
AsTarReader returns a ReadCloser with the contents of Dir as a tar archive.
func (*Fake) Close ¶
Close deletes the context
func (*Fake) Delete ¶
Delete a file at a path
Source Files ¶
- Version
- v17.11.0-ce-rc4+incompatible
- Published
- Nov 16, 2017
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 20 minutes ago –
Tools for package owners.