Documentation ¶
Index ¶
- func BuildSupplyChainStringParams(candidateParams []StringParam) ([]v1alpha1.BlueprintParam, error)
- func CliTest(directory string) error
- func Cmd(argv ...string) *cmd
- func ConvertNumbersToFloatsDuringComparison() (cmp.Options, error)
- func Execute()
- func YTT() *ytt
- type CMPOption
- type CompareOptions
- type Expectation
- type ExpectedFile
- type ExpectedObject
- type ExpectedUnstructured
- type FailedTest
- type Given
- type Inputs
- type MockSupplyChain
- type NoLog
- func (n *NoLog) Enabled(_ int) bool
- func (n *NoLog) Error(_ error, _ string, _ ...interface{})
- func (n *NoLog) Info(_ int, _ string, _ ...interface{})
- func (n *NoLog) Init(_ logr.RuntimeInfo)
- func (n *NoLog) WithName(name string) logr.LogSink
- func (n *NoLog) WithValues(_ ...interface{}) logr.LogSink
- type StringParam
- type Suite
- type SupplyChain
- type SupplyChainFileSet
- type SupplyChainInputs
- type SupplyChainInputsFile
- type SupplyChainInputsObject
- type SupplyChainParams
- type SupplyChainParamsFile
- type SupplyChainParamsObject
- type Template
- type TemplateFile
- type TemplateObject
- type Test
- type TestFailError
- type ValidatableTemplate
- type Values
- type Workload
- type WorkloadFile
- type WorkloadObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSupplyChainStringParams ¶ added in v0.7.4
func BuildSupplyChainStringParams(candidateParams []StringParam) ([]v1alpha1.BlueprintParam, error)
BuildSupplyChainStringParams is a helper method for creating string SupplyChainParams. SupplyChainParams that hold other valid JSON values must be constructed by hand.
func ConvertNumbersToFloatsDuringComparison ¶ added in v0.7.4
Types ¶
type CompareOptions ¶ added in v0.7.4
type Expectation ¶ added in v0.7.4
type Expectation interface {
// contains filtered or unexported methods
}
type ExpectedFile ¶ added in v0.7.4
type ExpectedFile struct {
Path string
}
type ExpectedObject ¶ added in v0.7.4
type ExpectedUnstructured ¶ added in v0.7.4
type ExpectedUnstructured struct {
Unstructured *unstructured.Unstructured
}
type FailedTest ¶
type FailedTest struct {
// contains filtered or unexported fields
}
type Given ¶ added in v0.7.4
type Given struct { Template Template Workload Workload SupplyChain SupplyChain }
Given must specify a Template and a Workload. SupplyChain is optional
type Inputs ¶ added in v0.6.0
type Inputs struct { Sources map[string]templates.SourceInput Images map[string]templates.ImageInput Configs map[string]templates.ConfigInput Deployment *templates.SourceInput }
type MockSupplyChain ¶ added in v0.7.4
type MockSupplyChain struct { Params SupplyChainParams Inputs SupplyChainInputs }
MockSupplyChain implements SupplyChain SupplyChainInputs simulate expected inputs that are the outputs from earlier resources in the supply chain SupplyChainParams supplies params as if defined in the supply chain
type NoLog ¶ added in v0.7.4
type NoLog struct{}
func (*NoLog) Init ¶ added in v0.7.4
func (n *NoLog) Init(_ logr.RuntimeInfo)
func (*NoLog) WithValues ¶ added in v0.7.4
type StringParam ¶
StringParam is a helper struct for use with the BuildSupplyChainStringParams method Either a Value or a DefaultValue should be specified for every StringParam A Name is required for every StringParam
type Suite ¶ added in v0.7.4
Suite is a collection of named template tests which may be run together
func (*Suite) Assert ¶ added in v0.7.4
func (s *Suite) Assert() ([]string, []*FailedTest)
Assert allows testing a Suite when a *testing.T is not available, e.g. when tests are not run from 'go test' It returns a list of the named tests that passed and a list of the named tests that failed with their errors
func (*Suite) HasFocusedTests ¶ added in v0.7.4
func (*Suite) RunConcurrently ¶ added in v0.7.4
type SupplyChain ¶ added in v0.7.4
type SupplyChain interface {
// contains filtered or unexported methods
}
type SupplyChainFileSet ¶ added in v0.7.4
type SupplyChainFileSet struct { Paths []string YttValues Values YttFiles []string TargetResourceName string PreviousOutputs *realizer.Outputs }
SupplyChainFileSet is a set of one or more supply chains Paths is a list of either paths to a supply chain or a directory containing supply chain files YttValues and YttFiles are values to use in preprocessing the supply chains TargetResourceName is the name of the resource/step that will be stamped PreviousOutputs are mocked outputs from earlier resources/steps in the supply chain
type SupplyChainInputs ¶ added in v0.7.4
type SupplyChainInputsFile ¶ added in v0.7.4
type SupplyChainInputsFile struct {
Path string
}
func (*SupplyChainInputsFile) GetInputs ¶ added in v0.7.4
func (p *SupplyChainInputsFile) GetInputs() (*Inputs, error)
type SupplyChainInputsObject ¶ added in v0.7.4
type SupplyChainInputsObject struct {
Inputs *Inputs
}
func (*SupplyChainInputsObject) GetInputs ¶ added in v0.7.4
func (i *SupplyChainInputsObject) GetInputs() (*Inputs, error)
type SupplyChainParams ¶ added in v0.7.4
type SupplyChainParams interface {
GetParams() ([]v1alpha1.BlueprintParam, error)
}
type SupplyChainParamsFile ¶ added in v0.7.4
type SupplyChainParamsFile struct {
Path string
}
func (*SupplyChainParamsFile) GetParams ¶ added in v0.7.4
func (p *SupplyChainParamsFile) GetParams() ([]v1alpha1.BlueprintParam, error)
type SupplyChainParamsObject ¶ added in v0.7.4
type SupplyChainParamsObject struct {
Params []v1alpha1.BlueprintParam
}
func (*SupplyChainParamsObject) GetParams ¶ added in v0.7.4
func (p *SupplyChainParamsObject) GetParams() ([]v1alpha1.BlueprintParam, error)
type Template ¶ added in v0.7.4
type Template interface {
GetTemplate() (*ValidatableTemplate, error)
}
type TemplateFile ¶ added in v0.7.4
TemplateFile implements Template Path is the filepath to the yaml template definition. This file may be pre-processed with ytt and including values provided as objects (YttValues) or in yaml files (YttFiles).
func (*TemplateFile) GetTemplate ¶ added in v0.7.4
func (i *TemplateFile) GetTemplate() (*ValidatableTemplate, error)
type TemplateObject ¶ added in v0.7.4
type TemplateObject struct {
Template ValidatableTemplate
}
TemplateObject implements Template
func (*TemplateObject) GetTemplate ¶ added in v0.7.4
func (t *TemplateObject) GetTemplate() (*ValidatableTemplate, error)
type Test ¶ added in v0.7.4
type Test struct { Given Given Expect Expectation CompareOptions *CompareOptions Focus bool }
Test is an individual template test. Given and Expect values must be provided. Fields in the expected object's metadata may be ignored When run as part of a Suite, an individual case(s) may be focused. This will exercise the individual test(s). Note that the overall suite will fail (preventing focused tests from passing CI).
type TestFailError ¶
type TestFailError struct {
// contains filtered or unexported fields
}
func (TestFailError) Error ¶
func (t TestFailError) Error() string
type ValidatableTemplate ¶ added in v0.7.4
type WorkloadFile ¶ added in v0.7.4
type WorkloadFile struct {
Path string
}
func (*WorkloadFile) GetWorkload ¶ added in v0.7.4
func (w *WorkloadFile) GetWorkload() (*v1alpha1.Workload, error)
type WorkloadObject ¶ added in v0.7.4
func (*WorkloadObject) GetWorkload ¶ added in v0.7.4
func (w *WorkloadObject) GetWorkload() (*v1alpha1.Workload, error)