kustomizesigs.k8s.io/kustomize/pkg/internal/loadertest Index | Files

package loadertest

import "sigs.k8s.io/kustomize/pkg/internal/loadertest"

Package loadertest holds a fake for the Loader interface.

Index

Types

type FakeLoader

type FakeLoader struct {
	// contains filtered or unexported fields
}

FakeLoader encapsulates the delegate Loader and the fake file system.

func NewFakeLoader

func NewFakeLoader(initialDir string) FakeLoader

NewFakeLoader returns a Loader that uses a fake filesystem. The argument should be an absolute file path.

func (FakeLoader) AddDirectory

func (f FakeLoader) AddDirectory(fullDirPath string) error

AddDirectory adds a fake directory to the file system.

func (FakeLoader) AddFile

func (f FakeLoader) AddFile(fullFilePath string, content []byte) error

AddFile adds a fake file to the file system.

func (FakeLoader) Cleanup

func (f FakeLoader) Cleanup() error

Cleanup does nothing

func (FakeLoader) Load

func (f FakeLoader) Load(location string) ([]byte, error)

Load performs load from a given location.

func (FakeLoader) New

func (f FakeLoader) New(newRoot string) (ifc.Loader, error)

New creates a new loader from a new root.

func (FakeLoader) Root

func (f FakeLoader) Root() string

Root returns root.

Source Files

fakeloader.go

Version
v1.0.11 (latest)
Published
Nov 29, 2018
Platform
linux/amd64
Imports
4 packages
Last checked
2 days ago

Tools for package owners.