Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Set = &defaultFixtureSet{ fixtures: map[Key]Fixture{}, }
Set is the default FixtureSet.
Functions ¶
func AddFromFile ¶
AddFromFile parses all the YAML objects from the given file and stores them in the default fixture set.
Types ¶
type Fixture ¶
type Fixture []byte
Fixture captures a single Kubernetes object that can be used as a test fixture. The fixture is stored as a YAML string so that is can be succinctly copied and losslessly rewritten.
func (Fixture) AsUnstructured ¶
func (f Fixture) AsUnstructured() *unstructured.Unstructured
AsUnstructured returns a copy of the fixture as a unstructured.Unstructured object.
type FixtureSet ¶
type FixtureSet interface { Insert(Key, Fixture) Match(u *unstructured.Unstructured) Fixture }
FixtureSet is a collection of fixture objects. nolint(golint)
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key is the indexing fixture set key.
func KeyFor ¶
func KeyFor(u *unstructured.Unstructured) Key
KeyFor returns the key for indexing the given object.
Click to show internal directories.
Click to hide internal directories.